Real-time data-driven UAV pollution monitoring flight path self-adjustment system and method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]为了弥补以上不足,本发明提供了实时数据驱动的无人机污染监测航线自调整系统及方法,旨在改善现有无人机污染监测中,因飞行状态关联的流场干扰与气体传感器响应滞后叠加导致航线自调整决策失准的问题
[0059]1.本发明中,通过轻量化流场校正模型对原始浓度数据进行飞行状态关联的动态幅值校正,并结合响应时间常数的一阶导数延迟补偿处理,有效消除了旋翼下洗气流动态干扰与传感器响应滞后对浓度测量的叠加影响,获得真实反映空间浓度分布的第二校正浓度数据。基于该数据生成的航线调整指令能够准确引导无人机沿真实浓度梯度方向飞行,解决了现有技术中流场干扰与响应滞后导致航线决策失准的问题。
Smart Images

Figure CN122569451A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) environmental monitoring technology, and in particular to a real-time data-driven UAV pollution monitoring flight path self-adjustment system and method. Background Technology
[0002] With the rapid development of drone technology, drones have been widely used in the field of air pollution monitoring, becoming an important supplement to traditional ground-based fixed-point monitoring and manual inspections. In tasks such as pollution source tracing, industrial park leak detection, and regional environmental quality assessment, drones, equipped with gas sensors, can collect pollutant concentration data in real time. Combined with flight path self-adjustment algorithms, they dynamically adjust their flight paths based on concentration distribution to achieve efficient tracking and location of pollution sources. In existing technologies, real-time data-driven flight path self-adjustment systems typically use concentration data collected by sensors as the basis for decision-making. By calculating concentration gradients or information gain, they generate flight path adjustment commands to guide the drone to fly in the direction of increasing concentration, thereby approaching the pollution source.
[0003] However, existing technologies, when applying sensor data to flight path self-adjustment decisions, generally assume that the concentration data output by the sensors is the real-time value of the current spatial location, without fully considering the impact of measurement errors faced by airborne gas sensors in actual flight environments on the accuracy of flight path decisions. Specifically, the distribution of downwash airflow generated by the rotors of multi-rotor UAVs changes under different flight states, causing dynamic interference in the flow field around the sensors. This results in deviations in measurement readings for different flight attitudes under the same concentration environment. Simultaneously, the inherent response time constant (T90) of commonly used gas sensors such as electrochemical and photoionization sensors is typically on the order of several seconds to tens of seconds, causing sensor readings to lag behind the actual spatial concentration changes traversed by the UAV. When the UAV rapidly traverses a pollutant plume, this measurement lag causes the system to continue flying in the original direction based on the rising, lag-lagging reading even after leaving the high-concentration area, thus missing the true location of the pollution source. The combined effect of these two types of errors—flow field interference and response lag—in the flight path self-adjustment closed loop severely reduces the location accuracy and real-time response of pollution source tracing, becoming a key bottleneck restricting the practical application of real-time data-driven flight path self-adjustment technology. Furthermore, existing technologies typically calculate concentration gradients based on instantaneous spatial sampling points. In scenarios with sensor response lag and high flight speeds, it is difficult to obtain effective sampling points that are synchronized in space, resulting in insufficient continuity and accuracy of gradient estimation, which further exacerbates the inaccuracy of flight path decisions. Summary of the Invention
[0004] To overcome the above shortcomings, this invention provides a real-time data-driven UAV pollution monitoring flight path self-adjustment system and method, aiming to improve the problem of inaccurate flight path self-adjustment decisions caused by the superposition of flow field interference related to flight status and gas sensor response lag in existing UAV pollution monitoring.
[0005] In a first aspect, the present invention provides the following technical solution: a real-time data-driven unmanned aerial vehicle (UAV) pollution monitoring flight path self-adjustment system, comprising:
[0006] The data acquisition module is used to acquire raw concentration data collected in real time by the gas sensor on the UAV, and simultaneously acquire the real-time flight status parameters output by the flight control system of the UAV.
[0007] The flow field correction module is used to input the real-time flight state parameters into a preset mapping relationship model between flight state and correction factor, and obtain the dynamic correction factor output by the mapping relationship model.
[0008] An amplitude correction module is used to correct the original concentration data using the dynamic correction factor to obtain first corrected concentration data;
[0009] The delay compensation module is used to perform delay compensation processing on the first corrected concentration data based on the response time constant of the gas sensor to obtain the second corrected concentration data. The delay compensation processing is performed according to the following formula:
[0010] :
[0011] in, This is the second corrected concentration data. This is the first corrected concentration data. For the response time constant, This is the first derivative of the first corrected concentration data;
[0012] The gradient calculation module is used to construct a local concentration field based on the second corrected concentration data with spatiotemporal correlation collected by the UAV during its movement, and to calculate the concentration gradient information of the local concentration field in the current flight direction of the UAV.
[0013] The flight path adjustment module is used to generate flight path adjustment instructions based on the concentration gradient information in order to control the UAV to adjust its flight path.
[0014] Furthermore, in the data acquisition module, the steps for acquiring raw concentration data and real-time flight status parameters specifically include:
[0015] The analog voltage signal or digital concentration value output by the gas sensor is read at a preset sampling frequency and used as the raw concentration data;
[0016] The original concentration data is subjected to low-pass filtering to remove high-frequency noise components;
[0017] The three-axis velocity components, three-axis acceleration components, pitch angle, roll angle, and rotor speed information of the UAV are read synchronously from the data bus of the flight control system to form the real-time flight status parameters.
[0018] Furthermore, the preset mapping relationship model between flight state and correction factor is a lightweight neural network model; in the flow field correction module, the step of obtaining the dynamic correction factor output by the mapping relationship model specifically includes:
[0019] The real-time flight state parameters are normalized to obtain a normalized flight state feature vector;
[0020] The normalized flight state feature vector is input into the lightweight neural network model;
[0021] The dynamic correction factor output by the output layer is obtained through forward propagation calculation of the lightweight neural network model.
[0022] Furthermore, in the amplitude correction module, the step of obtaining the first correction concentration data specifically includes:
[0023] Obtain the original concentration data after low-pass filtering;
[0024] The original concentration data is multiplied by the dynamic correction factor to obtain the first corrected concentration data. The calculation formula is as follows:
[0025] ;
[0026] in, This is the first corrected concentration data. As a dynamic correction factor, This is the original concentration data after low-pass filtering.
[0027] Furthermore, in the delay compensation module, the step of obtaining the second corrected concentration data specifically includes:
[0028] Obtain the response time constant of the gas sensor. ;
[0029] Calculate the first derivative of the first corrected concentration data. ;
[0030] The second corrected concentration data is obtained using the following formula:
[0031] ;
[0032] Furthermore, in the gradient calculation module, the step of calculating the concentration gradient information specifically includes:
[0033] Maintain a sliding time window of a preset length, and store the spatial trajectory points of the UAV flying over within the window and their corresponding second correction concentration data;
[0034] Using the current location of the UAV as the center, a spatiotemporal subset is selected within the sliding time window;
[0035] Based on the data points in the aforementioned spatiotemporal subset, a local concentration surface is fitted using a local weighted regression algorithm;
[0036] Calculate the gradient vector of the local concentration surface at the current position of the UAV, and use the projection value of the gradient vector onto the current flight direction of the UAV as the concentration gradient information.
[0037] Furthermore, in the locally weighted regression algorithm, the weight of each data point is determined by the spatial distance and time interval between the data point and the current position of the UAV, and the weight function is:
[0038] ;
[0039] in, For the first The weight of each data point For spatial distance, For time intervals, For spatial bandwidth parameters, This refers to the time bandwidth parameter.
[0040] Furthermore, in the flight path adjustment module, the steps for controlling the UAV to adjust its flight path specifically include:
[0041] Determine whether the absolute value of the concentration gradient information is greater than a preset gradient threshold;
[0042] When the absolute value of the concentration gradient information is greater than the preset gradient threshold, if the sign of the concentration gradient information is positive, the current heading is determined as the target heading adjustment direction; if the sign of the concentration gradient information is negative, an instruction is generated to make the UAV adjust its heading by a preset angle increment, and the concentration gradient information is reacquired on each adjusted heading until the sign of the concentration gradient information is positive, then the heading is determined as the target heading adjustment direction.
[0043] The target heading adjustment rate is determined based on a preset nonlinear mapping relationship between the absolute value of the concentration gradient information and the target heading adjustment rate.
[0044] The route adjustment instruction is generated based on the target heading adjustment direction and the target heading adjustment rate;
[0045] The flight path adjustment command is sent to the flight control system of the UAV so that the UAV adjusts its flight path according to the flight path adjustment command.
[0046] Furthermore, the preset nonlinear mapping relationship is as follows:
[0047] ;
[0048] in, Adjust the rate to the target heading. This represents the maximum yaw rate of the drone. For concentration gradient information, It is the saturation constant.
[0049] Secondly, the present invention provides the following technical solution: a real-time data-driven method for self-adjusting flight paths for UAV pollution monitoring, comprising the following steps:
[0050] The system acquires raw concentration data collected in real time by the gas sensor on board the UAV, and simultaneously acquires real-time flight status parameters output by the UAV's flight control system.
[0051] The real-time flight status parameters are input into a preset mapping model between flight status and correction factors to obtain the dynamic correction factor output by the mapping model.
[0052] The original concentration data is corrected using the dynamic correction factor to obtain the first corrected concentration data;
[0053] Based on the response time constant of the gas sensor, the first corrected concentration data is subjected to delay compensation processing to obtain the second corrected concentration data, wherein the delay compensation formula is:
[0054] ;
[0055] Based on the second corrected concentration data with spatiotemporal correlation collected by the UAV during its movement, a local concentration field is constructed, and the concentration gradient information of the local concentration field in the current flight direction of the UAV is calculated.
[0056] Based on the concentration gradient information, a flight path adjustment command is generated to control the UAV to adjust its flight path, wherein the flight path adjustment rate follows:
[0057] .
[0058] The present invention has the following beneficial effects:
[0059] 1. In this invention, a lightweight flow field correction model is used to dynamically correct the original concentration data based on flight state correlation. Combined with first-order derivative delay compensation of the response time constant, this effectively eliminates the combined effects of dynamic interference from the rotor downwash and sensor response lag on concentration measurement, obtaining second corrected concentration data that truly reflects the spatial concentration distribution. Flight path adjustment commands generated based on this data can accurately guide the UAV to fly along the true concentration gradient direction, solving the problem of inaccurate flight path decisions caused by flow field interference and response lag in existing technologies.
[0060] 2. In this invention, a spatiotemporal sliding window is constructed and a local weighted regression algorithm is used to fit the local concentration surface. This reconstructs a continuous local concentration field from the spatiotemporal trajectory data collected by the UAV, and then calculates the concentration gradient information along the current flight path. This method effectively overcomes the problems of insufficient spatial synchronization data and poor estimation continuity in traditional instantaneous spatial sampling gradient estimation under sensor response lag scenarios. It achieves continuous, accurate, and stable estimation of the concentration gradient, providing a reliable basis for flight path self-adjustment.
[0061] 3. In this invention, by introducing a first derivative term in the delay compensation process, the compensated concentration data has the characteristic of leading the original sensor reading in time phase. Based on this advanced compensation data combined with spatiotemporal gradient estimation, the UAV can predict the concentration change trend ahead and generate flight path adjustment commands in advance before fully entering the high concentration area, avoiding overshoot and oscillation caused by sensor response lag, and further shortening the pollution source location time.
[0062] 4. In this invention, a gradient threshold judgment mechanism and a nonlinear smoothing adjustment strategy are introduced during the route adjustment command generation process. A valid heading adjustment command is only generated when the absolute value of the concentration gradient information is greater than a preset threshold, and the heading adjustment rate smoothly changes according to the gradient magnitude via a nonlinear mapping relationship. This mechanism effectively suppresses frequent invalid maneuvers caused by small concentration fluctuations or measurement noise, achieving rapid tracking of significant concentration changes while also allowing for fine-tuning at low speeds. This reduces unnecessary energy consumption of the UAV, extends the effective monitoring endurance, and improves the smoothness and stability of the flight path. Attached Figure Description
[0063] Figure 1 This is a schematic diagram of the architecture of the real-time data-driven UAV pollution monitoring route self-adjustment system proposed in this invention.
[0064] Figure 2 This is a flowchart illustrating the real-time data-driven UAV pollution monitoring route self-adjustment method proposed in this invention. Detailed Implementation
[0065] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0066] This invention provides a real-time data-driven unmanned aerial vehicle (UAV) pollution monitoring flight path self-adjustment system, such as... Figure 1 As shown, it includes:
[0067] The data acquisition module is used to acquire raw concentration data collected in real time by the gas sensor on the UAV, and simultaneously acquire real-time flight status parameters output by the UAV's flight control system.
[0068] Furthermore, in the data acquisition module, the steps for acquiring raw concentration data and real-time flight status parameters specifically include:
[0069] The analog voltage signal or digital concentration value output by the gas sensor is read at a preset sampling frequency and used as the raw concentration data;
[0070] The original concentration data is low-pass filtered to remove high-frequency noise components;
[0071] The system synchronously reads the UAV's three-axis velocity components, three-axis acceleration components, pitch angle, roll angle, and rotor speed information from the flight control system's data bus to form real-time flight status parameters.
[0072] Specifically, the analog voltage signal or digital concentration value output by the gas sensor is read at a preset sampling frequency as the raw concentration data. The preset sampling frequency is set according to the response characteristics of the gas sensor, for example, any frequency value within the range of 10Hz to 50Hz. The raw concentration data is then low-pass filtered to remove high-frequency noise components. The low-pass filtering is implemented using a first-order digital low-pass filter, and its filtering formula is as follows:
[0073] ;
[0074] in, This is the current filter output value. This is the current raw concentration data. This is the filtered output value from the previous moment. These are the filter coefficients. . The smaller the value, the stronger the filtering and smoothing effect, and the slower the response speed; The larger the value, the faster the response speed, but the weaker the smoothing effect. This is based on the characteristics of gas concentration changes. It can be set to any value between 0.1 and 0.3.
[0075] The system synchronously reads the UAV's three-axis velocity components, three-axis acceleration components, pitch angle, roll angle, and rotor speed information from the flight control system's data bus to form real-time flight status parameters. The flight control system's data bus can use any of the following communication interfaces: CAN bus, UART serial bus, or MAVLink protocol. The three-axis velocity components include the X-axis velocity, Y-axis velocity, and Z-axis velocity in the body coordinate system; the three-axis acceleration components include the X-axis acceleration, Y-axis acceleration, and Z-axis acceleration in the body coordinate system. The rotor speed information is the current rotational speed of each rotor motor of the UAV, which can be directly read from the motor control output channel of the flight control system.
[0076] The raw concentration data obtained above is processed by low-pass filtering and then output synchronously with the real-time flight status parameters to the flow field correction module for subsequent processing.
[0077] The flow field correction module is used to input the real-time flight state parameters into a preset mapping relationship model between flight state and correction factor, and obtain the dynamic correction factor output by the mapping relationship model.
[0078] Furthermore, in the flow field correction module, the steps for obtaining the dynamic correction factor specifically include:
[0079] The real-time flight state parameters are normalized to obtain the normalized flight state feature vector;
[0080] Input the normalized flight state feature vector into the mapping relationship model;
[0081] The dynamic correction factor of the output layer is obtained through forward propagation calculation of the mapping relationship model.
[0082] Specifically, the preset mapping model between flight state and correction factor is preferably implemented as a lightweight flow field correction model in this embodiment. This model is a pre-built and trained neural network model. The structure of this neural network model includes an input layer, two hidden layers, and an output layer. The number of nodes in the input layer is the same as the dimension of the real-time flight state parameters. In this embodiment, the real-time flight state parameters include three-axis velocity components. Triaxial acceleration components Pitch angle Roll angle and rotor speed There are a total of nine parameters, so the number of input layer nodes is set to 9.
[0083] The first hidden layer contains 16 nodes, and the second hidden layer contains 8 nodes. Each hidden layer uses the ReLU activation function, the expression of which is:
[0084] ;
[0085] The output layer contains one node, uses a linear activation function, and outputs a dynamic correction factor. .
[0086] The training process of the lightweight flow field correction model is as follows: In a controlled wind field environment, the UAV is placed in a standard gas environment of known concentration. The UAV is controlled to perform various flight states, including hovering, forward flight at different speeds, climbing, and descending. Real-time flight state parameters and measured concentration values output by the gas sensors are recorded simultaneously for each flight state. The true correction factor for each flight state is then calculated. The calculation formula is:
[0087] ;
[0088] in, For a standard gas with a known concentration value, This corresponds to the measured concentration value output by the gas sensor during flight.
[0089] The recorded real-time flight status parameters are used as input samples, corresponding to The training dataset is constructed using labels. Mean squared error is used as the loss function, expressed as:
[0090] ;
[0091] in, The number of training samples. The dynamic correction factor predicted by the model. This is the true correction factor.
[0092] The Adam optimizer is used to iteratively update the weight parameters of the neural network model until the loss function converges to below a preset threshold, resulting in a trained lightweight flow field correction model. The trained model weight parameters are then fixed and deployed to the onboard edge computing unit of the UAV.
[0093] After receiving real-time flight state parameters from the data acquisition module, the flow field correction module performs the following processing: First, it normalizes the real-time flight state parameters to obtain a normalized flight state feature vector. The normalization process uses the maximum-minimum normalization method, and the normalization formula is:
[0094] ;
[0095] in, These are the original flight state parameter values. To find the minimum value of this parameter in the training dataset, To find the maximum value of this parameter in the training dataset, These are the normalized eigenvalues. and The model is pre-determined and stored in the onboard computing unit during the model training phase.
[0096] Secondly, the normalized flight state feature vector is input into the lightweight flow field correction model. This feature vector is a one-dimensional vector containing the same number of elements as the number of nodes in the input layer. Finally, the dynamic correction factor output by the output layer is obtained through forward propagation calculation of the lightweight flow field correction model. .
[0097] The aforementioned dynamic correction factor is output to the amplitude correction module for correcting the original concentration data.
[0098] The amplitude correction module is used to correct the original concentration data using a dynamic correction factor to obtain the first corrected concentration data.
[0099] Furthermore, in the amplitude correction module, the steps for obtaining the first corrected concentration data specifically include:
[0100] Obtain the raw concentration data after low-pass filtering;
[0101] The original concentration data is multiplied by the dynamic correction factor to obtain the first corrected concentration data.
[0102] Specifically, the amplitude correction module receives the raw concentration data (after low-pass filtering) from the data acquisition module, and the dynamic correction factor from the flow field correction module. The raw concentration data and the dynamic correction factor are multiplied to obtain the first corrected concentration data. The calculation formula is as follows:
[0103] ;
[0104] in, This is the first corrected concentration data. As a dynamic correction factor, This is the original concentration data after low-pass filtering.
[0105] The aforementioned first corrected concentration data is output to the delay compensation module for subsequent delay compensation processing.
[0106] The delay compensation module is used to perform delay compensation processing on the first corrected concentration data based on the response time constant of the gas sensor to obtain the second corrected concentration data.
[0107] Furthermore, in the delay compensation module, the steps for obtaining the second corrected concentration data specifically include:
[0108] Obtain the response time constant of the gas sensor;
[0109] Calculate the first derivative of the first corrected concentration data;
[0110] The second corrected concentration data is obtained by adding the product of the response time constant and the first derivative to the first corrected concentration data.
[0111] Specifically, the delay compensation module receives the first corrected concentration data from the amplitude correction module and acquires the response time constant of the gas sensor. The response time constant is the T90 response time calibrated at the factory of the gas sensor. For example, the response time constant of an electrochemical gas sensor is typically 3 to 30 seconds, and the response time constant of a photoionization gas sensor is typically 1 to 5 seconds. The response time constant is pre-stored in the memory of the onboard computing unit. The delay compensation module calculates the first derivative of the first corrected concentration data. To avoid amplifying high-frequency noise in the differential operation and to ensure the stability of the delay compensation, in this embodiment, the first corrected concentration data sequence is first filtered by a moving average with a window length of M, and then the first derivative is calculated using the discrete central difference method on the filtered data. Since the first corrected concentration data has already undergone low-pass filtering in the previous data acquisition module, its high-frequency noise has been effectively suppressed, and the above method can obtain a stable derivative value that meets engineering requirements. The calculation formula is:
[0112] ;
[0113] ;
[0114] in, This is the first corrected concentration data after moving average filtering. The moving average window length can be set according to the sampling frequency, for example, 5 to 10. This represents the sampling time interval.
[0115] The second corrected concentration data is obtained by adding the product of the response time constant and the first derivative to the first corrected concentration data. The calculation formula is as follows:
[0116] ;
[0117] in, This is the second corrected concentration data at the current moment. This is the response time constant.
[0118] The aforementioned second corrected concentration data is output to the gradient calculation module for calculating concentration gradient information. Through the aforementioned delay compensation processing, the second corrected concentration data has a leading characteristic in time phase compared to the first corrected concentration data, which can compensate for the measurement delay caused by the gas sensor's response lag.
[0119] The gradient calculation module is used to construct a local concentration field based on the second corrected concentration data with spatiotemporal correlation collected by the UAV during its movement, and to calculate the concentration gradient information of the local concentration field in the current flight direction of the UAV.
[0120] Furthermore, in the gradient calculation module, the steps for calculating the concentration gradient information specifically include:
[0121] Maintain a sliding time window of a preset length, and store the spatial trajectory points of the UAV flying over within the window and their corresponding second correction concentration data;
[0122] Using the current location of the UAV as the center, a spatiotemporal subset is selected within the sliding time window;
[0123] Based on the data points in the aforementioned spatiotemporal subset, a local concentration surface is fitted using a local weighted regression algorithm;
[0124] Calculate the gradient vector of the local concentration surface at the current position of the UAV, and use the projection value of the gradient vector onto the current flight direction of the UAV as the concentration gradient information.
[0125] Furthermore, in the local weighted regression algorithm, the weight of each data point is determined by the spatial distance and time interval between the data point and the current position of the UAV.
[0126] Specifically, the gradient calculation module receives the second correction concentration data from the delay compensation module and obtains the UAV's current heading vector in the spatial coordinate system from the flight control system. The current heading vector is represented as... This vector is calculated by the flight control system based on the current yaw and pitch angles of the UAV.
[0127] The specific implementation principle of this module is as follows: by utilizing the characteristics of mobile data collection by UAVs, historical trajectory points with timestamps are regarded as spatiotemporal samples of the current local concentration field. The surface fitting method is used to reconstruct the continuous local concentration field using the spatiotemporal sampling points, and then the gradient is calculated.
[0128] The specific implementation steps are as follows:
[0129] Step 1: Maintain the sliding time window.
[0130] A sliding time window of fixed length is maintained in the memory of the onboard computing unit. The length of this time window is... The settings are based on a combination of the gas sensor's response characteristics and the drone's flight speed, for example, set to any value within the range of 5 to 15 seconds. A data queue is stored within the window, and each element in the queue is a quadruple containing a timestamp of the data acquisition time. The three-dimensional coordinates of the UAV in the spatial coordinate system at that moment and the second corrected concentration data corresponding to that coordinate position. Whenever the delay compensation module outputs new second-correction concentration data, it is added to the tail of the queue along with the current time and the drone's location information; simultaneously, all timestamps at the head of the queue that are earlier than the current time are deleted and subtracted. The data is used to keep the window length constant.
[0131] Step 2: Select a spatiotemporal subset.
[0132] Calculating the current moment When calculating the concentration gradient, the current position of the drone is used. Centered on a time window, a spatiotemporal subset is selected from the queue of the sliding time window. The selection criteria are: simultaneously satisfying both spatial proximity and temporal freshness conditions. The spatial proximity condition is: data points... and The Euclidean distance between them is less than the preset spatial neighborhood radius. ,Right now The time freshness condition is the timestamp of the data point. satisfy ,in The preset freshness threshold, and . The setting is based on the expected spatial scale of the pollution plume, for example, any value within the range of 5 to 20 meters; Set as with The same or slightly smaller value. If the selected subset... The number of data points in the dataset is less than the preset minimum number of fitted points. (For example, If set to 6), it is determined that the current data is insufficient for reliable gradient estimation, and the concentration gradient information is directly set to 6. Then, the gradient calculation ends.
[0133] Step 3: Local weighted regression surface fitting.
[0134] Using subsets The data points are fitted to a local concentration surface using a locally weighted linear regression algorithm. The fitting model is a quadratic polynomial surface in three-dimensional space, expressed as:
[0135] ;
[0136] in, For spatial coordinates, to The coefficients are to be fitted.
[0137] The fitting process uses the weighted least squares method, which minimizes the following weighted sum of squared residuals:
[0138] ;
[0139] Among them, weight Based on data points With current location spatial distance and time interval This is jointly determined. The weighting function takes the form of a product of Gaussian kernel functions:
[0140] ;
[0141] in, The spatial bandwidth parameter controls the degree to which spatial distance affects the weights; it can be set to... of ; The time bandwidth parameter controls the degree to which the time interval affects the weights; it can be set to... of .
[0142] By solving the above weighted least squares problem, the polynomial coefficients are obtained. to The optimal estimate is obtained. This problem is a standard linear weighted least squares fitting problem. Under the condition that the number of data points is greater than the number of coefficients to be determined, the closed-form analytical solution of the coefficient vector can be obtained by establishing and solving the normal equation of the problem. Since the number of spatiotemporal subset data points selected by this system in each gradient calculation is limited, and the fitting is a low-order polynomial, the matrix dimension of the normal equation is low, which can be solved in real time on the UAV's onboard embedded computing unit.
[0143] Step 4: Gradient calculation and projection.
[0144] The analytical expression of the local concentration surface is obtained. Then, the surface is at its current position. The gradient vector at is The first-order partial derivative vector with respect to spatial coordinates is The value at that point. Since the fitted model is a quadratic polynomial, the gradient vector can be directly calculated analytically from the coefficients. Specifically, the gradient vector... The formulas for calculating each component are as follows:
[0145] ;
[0146] Calculate the local concentration field gradient vector in the current heading vector The projected values are used as concentration gradient information. The formula for calculating the projection value is:
[0147] ;
[0148] The above concentration gradient information It is output to the route adjustment module. When When, it indicates that the concentration is increasing along the current course; when This indicates that the concentration is decreasing along the current course; The absolute value reflects the degree of drastic change in concentration.
[0149] The flight path adjustment module is used to generate flight path adjustment instructions based on the concentration gradient information in order to control the UAV to adjust its flight path.
[0150] Furthermore, in the flight path adjustment module, the steps for controlling the UAV to adjust its flight path specifically include:
[0151] Determine whether the absolute value of the concentration gradient information is greater than a preset gradient threshold;
[0152] When the absolute value of the concentration gradient information is greater than the preset gradient threshold, if the sign of the concentration gradient information is positive, the current heading is determined as the target heading adjustment direction; if the sign of the concentration gradient information is negative, an instruction is generated to make the UAV adjust its heading by a preset angle increment, and the concentration gradient information is reacquired on each adjusted heading until the sign of the concentration gradient information is positive, then the heading is determined as the target heading adjustment direction.
[0153] The target heading adjustment rate is determined based on a preset nonlinear mapping relationship between the absolute value of the concentration gradient information and the target heading adjustment rate.
[0154] Generate a route adjustment instruction based on the target heading adjustment direction and the target heading adjustment rate;
[0155] The flight path adjustment command is sent to the UAV's flight control system so that the UAV adjusts its flight path according to the command.
[0156] Furthermore, the preset nonlinear mapping relationship is as follows:
[0157] ;
[0158] in, Adjust the rate to the target heading. This represents the maximum yaw rate of the drone. For concentration gradient information, It is the saturation constant.
[0159] Specifically, the route adjustment module receives concentration gradient information from the gradient calculation module. Determine whether the absolute value of the concentration gradient information is greater than a preset gradient threshold. Preset gradient threshold The noise level of the gas sensor and the characteristics of ambient concentration fluctuations are preset, for example, set to... to Any value within the range. If If the concentration change is not significant, no flight path adjustment command will be generated, and the drone will continue to fly on its current course.
[0160] When the absolute value of the concentration gradient information is greater than the preset gradient threshold, that is... At that time, the target heading adjustment direction is determined based on the positive or negative sign of the concentration gradient information, and the target heading adjustment rate is determined based on the preset nonlinear mapping relationship. The target heading adjustment direction is determined as follows: if This indicates that the concentration is increasing along the current heading, so the target heading adjustment direction is to maintain the current heading, and the drone continues to fly forward. If If the concentration trend along the current heading is downward, the heading will be changed. At this point, the course adjustment module generates an exploration command, controlling the UAV to yaw left or right in fixed angular increments (e.g., 15 degrees). After adjusting to the new heading, the system immediately re-executes gradient calculations to determine the sign of the concentration gradient information in the new heading. This process is repeated until the concentration gradient information obtained in the new heading is positive (…). If the direction of concentration increase has been found, then this direction is designated as the new target direction, and the direction exploration is stopped. This online search strategy based on gradient symbol feedback makes full use of the accurate concentration gradient information provided by this invention, and can quickly and reliably lock the local optimal source tracing direction, effectively avoiding flight oscillations and energy waste caused by blind search.
[0161] The target heading adjustment rate is determined based on a preset nonlinear mapping relationship, specifically using the following formula:
[0162] ;
[0163] in, Adjust the rate to the target heading. This represents the maximum yaw rate of the drone. For concentration gradient information, This is the saturation constant. The saturation constant is calibrated based on actual flight tests, for example, it may be set to a value of... This nonlinear mapping relationship makes: when Much larger hour, Approaching To enable rapid turning to track significant concentration changes; when When approaching the gradient threshold, The smooth reduction enables fine-tuning at low speeds, avoiding violent maneuvers caused by slight concentration fluctuations. This mechanism effectively suppresses unnecessary frequent turns, reduces unnecessary energy consumption of the UAV, extends the effective monitoring endurance, and improves the smoothness and stability of the flight path.
[0164] Based on the target heading adjustment direction and rate, a flight path adjustment command is generated. This command includes the target heading angle and yaw rate parameters. The flight path adjustment command is then sent to the UAV's flight control system. Upon receiving the command, the flight control system executes corresponding heading adjustment maneuvers via its attitude control loop and position control loop, causing the UAV to adjust its flight path according to the command.
[0165] The above processing flow from the data acquisition module to the route adjustment module is repeated to form a real-time data-driven closed-loop route self-adjustment control until the pollution source is located or the monitoring task ends.
[0166] Example 2:
[0167] In existing real-time data-driven UAV pollution monitoring flight path self-adjustment methods, the measurement accuracy of the gas sensor onboard the UAV is affected by the dynamic interference of the rotor downwash airflow associated with the flight state during actual flight, resulting in amplitude deviations in measurement readings at different flight attitudes under the same concentration environment. Simultaneously, the inherent response time constant of the gas sensor causes the measurement data to lag behind spatial concentration changes in time phase. These two types of errors—flow field interference and response lag—act superimposed in the flight path self-adjustment closed loop, causing the flight path adjustment commands generated based on the measurement data to fail to accurately guide the UAV along the true concentration gradient direction, severely reducing the location accuracy and real-time response of pollution source tracing. To solve these problems, this invention provides a real-time data-driven UAV pollution monitoring flight path self-adjustment method, the structure of which is as follows: Figure 2 As shown. The specific implementation process of this method is as follows:
[0168] The system acquires raw concentration data collected in real time by the gas sensor on the drone and simultaneously acquires real-time flight status parameters output by the drone's flight control system.
[0169] Input the real-time flight status parameters into a preset mapping model between flight status and correction factors to obtain the dynamic correction factor output by the mapping model.
[0170] The original concentration data is corrected using a dynamic correction factor to obtain the first corrected concentration data;
[0171] Based on the response time constant of the gas sensor, delay compensation processing is performed on the first corrected concentration data to obtain the second corrected concentration data, wherein the delay compensation formula is:
[0172] ;
[0173] Based on the second corrected concentration data with spatiotemporal correlation collected by the UAV during its movement, a local concentration field is constructed, and the concentration gradient information of the local concentration field in the current flight direction of the UAV is calculated.
[0174] Based on the concentration gradient information, a flight path adjustment command is generated to control the UAV to adjust its flight path, wherein the flight path adjustment rate follows:
[0175] ;
[0176] Specifically, the system acquires raw concentration data collected in real time by the gas sensors mounted on the UAV, and simultaneously acquires real-time flight status parameters output by the UAV's flight control system. The raw concentration data is the concentration value obtained after low-pass filtering of the analog voltage signal or digital concentration value output by the gas sensor at the current sampling moment. The real-time flight status parameters include three-axis velocity components, three-axis acceleration components, pitch angle, roll angle, and rotor speed information.
[0177] Real-time flight state parameters are input into a preset mapping model between flight state and correction factor to obtain the dynamic correction factor output by the mapping model. In this embodiment, the mapping model is preferably a lightweight flow field correction model, which dynamically predicts the degree of flow field interference under the current flight attitude based on the input real-time flight state parameters and outputs the corresponding dynamic correction factor.
[0178] The original concentration data is corrected using a dynamic correction factor to obtain the first corrected concentration data. Specifically, the original concentration data is multiplied by the dynamic correction factor to eliminate the influence of flow field interference caused by changes in flight state on the concentration measurement amplitude, thus obtaining the first corrected concentration data.
[0179] Based on the response time constant of the gas sensor, delay compensation processing is performed on the first corrected concentration data to obtain the second corrected concentration data. Specifically, the first derivative of the first corrected concentration data is calculated, and the product of the response time constant and the first derivative is added to the first corrected concentration data to compensate for the phase deviation caused by the response lag of the gas sensor, thus obtaining the second corrected concentration data.
[0180] Calculate the concentration gradient information of the second corrected concentration data in the current flight direction of the UAV. Specifically, maintain a sliding time window to store historical spatiotemporal trajectory points, fit a local concentration surface based on a local weighted regression algorithm, calculate the gradient projection value of the surface in the current flight direction, and obtain the concentration gradient information.
[0181] A flight path adjustment command is generated based on the concentration gradient information to control the UAV to adjust its flight path. Specifically, it is determined whether the absolute value of the concentration gradient information is greater than a preset gradient threshold; when the absolute value of the concentration gradient information is greater than the preset gradient threshold, the target heading adjustment direction is determined based on the positive or negative sign of the concentration gradient information, and then adjusted according to a nonlinear mapping relationship:
[0182] ;
[0183] Determine the target heading adjustment rate; generate a flight path adjustment command based on the target heading adjustment direction and the target heading adjustment rate, and send the flight path adjustment command to the UAV's flight control system to control the UAV to fly along the direction of the concentration gradient increase, thereby achieving autonomous tracking of the pollution source.
[0184] Through the above steps, this invention achieves joint data processing of adaptive flow field correction and response time constant compensation for flight state, making the concentration data on which the flight path self-adjustment decision is based closer to the real spatial distribution, and significantly improving the positioning accuracy and real-time response of pollution source tracing.
[0185] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A real-time data-driven unmanned aerial vehicle (UAV) pollution monitoring flight path self-adjustment system, characterized in that, include: The data acquisition module is used to acquire raw concentration data collected in real time by the gas sensor on the UAV, and simultaneously acquire the real-time flight status parameters output by the flight control system of the UAV. The flow field correction module is used to input the real-time flight state parameters into a preset mapping relationship model between flight state and correction factor, and obtain the dynamic correction factor output by the mapping relationship model. An amplitude correction module is used to correct the original concentration data using the dynamic correction factor to obtain first corrected concentration data; The delay compensation module is used to perform delay compensation processing on the first corrected concentration data based on the response time constant of the gas sensor to obtain the second corrected concentration data. The delay compensation processing is performed according to the following formula: : in, This is the second corrected concentration data. This is the first corrected concentration data. For the response time constant, This is the first derivative of the first corrected concentration data; The gradient calculation module is used to construct a local concentration field based on the second corrected concentration data with spatiotemporal correlation collected by the UAV during its movement, and to calculate the concentration gradient information of the local concentration field in the current flight direction of the UAV. The flight path adjustment module is used to generate flight path adjustment instructions based on the concentration gradient information in order to control the UAV to adjust its flight path.
2. The real-time data-driven UAV pollution monitoring flight path self-adjustment system according to claim 1, characterized in that, In the data acquisition module, the steps for acquiring raw concentration data and real-time flight status parameters specifically include: The analog voltage signal or digital concentration value output by the gas sensor is read at a preset sampling frequency and used as the raw concentration data; The original concentration data is subjected to low-pass filtering to remove high-frequency noise components; The three-axis velocity components, three-axis acceleration components, pitch angle, roll angle, and rotor speed information of the UAV are read synchronously from the data bus of the flight control system to form the real-time flight status parameters.
3. The real-time data-driven UAV pollution monitoring flight path self-adjustment system according to claim 1, characterized in that, The preset mapping relationship model between flight state and correction factor is a lightweight neural network model; in the flow field correction module, the step of obtaining the dynamic correction factor output by the mapping relationship model specifically includes: The real-time flight state parameters are normalized to obtain a normalized flight state feature vector; The normalized flight state feature vector is input into the lightweight neural network model; The dynamic correction factor output by the output layer is obtained through forward propagation calculation of the lightweight neural network model.
4. The real-time data-driven UAV pollution monitoring flight path self-adjustment system according to claim 1, characterized in that, In the amplitude correction module, the step of obtaining the first correction concentration data specifically includes: Obtain the original concentration data after low-pass filtering; The original concentration data is multiplied by the dynamic correction factor to obtain the first corrected concentration data. The calculation formula is as follows: ; in, This is the first corrected concentration data. As a dynamic correction factor, This is the original concentration data after low-pass filtering.
5. The real-time data-driven UAV pollution monitoring flight path self-adjustment system according to claim 1, characterized in that, In the delay compensation module, the step of obtaining the second corrected concentration data specifically includes: Obtain the response time constant of the gas sensor. ; Calculate the first derivative of the first corrected concentration data. ; The second corrected concentration data is obtained using the following formula: 。 6. The real-time data-driven UAV pollution monitoring flight path self-adjustment system according to claim 1, characterized in that, In the gradient calculation module, the steps for calculating the concentration gradient information specifically include: Maintain a sliding time window of a preset time length, and store the spatial trajectory points of the UAV flying over within the window and their corresponding second correction concentration data; Using the current location of the UAV as the center, a spatiotemporal subset is selected within the sliding time window; Based on the data points in the aforementioned spatiotemporal subset, a local concentration surface is fitted using a local weighted regression algorithm; Calculate the gradient vector of the local concentration surface at the current position of the UAV, and use the projection value of the gradient vector onto the current flight direction of the UAV as the concentration gradient information.
7. The real-time data-driven UAV pollution monitoring flight path self-adjustment system according to claim 6, characterized in that, In the local weighted regression algorithm, the weight of each data point is determined by the spatial distance and time interval between the data point and the current position of the UAV. The weighting function is as follows: ; in, For the first The weight of each data point For spatial distance, For time intervals, For spatial bandwidth parameters, This refers to the time bandwidth parameter.
8. The real-time data-driven UAV pollution monitoring flight path self-adjustment system according to claim 1, characterized in that, In the flight path adjustment module, the steps for controlling the UAV to adjust its flight path specifically include: Determine whether the absolute value of the concentration gradient information is greater than a preset gradient threshold; When the absolute value of the concentration gradient information is greater than the preset gradient threshold, if the sign of the concentration gradient information is positive, the current heading is determined as the target heading adjustment direction; if the sign of the concentration gradient information is negative, an instruction is generated to make the UAV adjust its heading by a preset angle increment, and the concentration gradient information is reacquired on each adjusted heading until the sign of the concentration gradient information is positive, then the heading is determined as the target heading adjustment direction. The target heading adjustment rate is determined based on a preset nonlinear mapping relationship between the absolute value of the concentration gradient information and the target heading adjustment rate. The route adjustment instruction is generated based on the target heading adjustment direction and the target heading adjustment rate; The flight path adjustment command is sent to the flight control system of the UAV so that the UAV adjusts its flight path according to the flight path adjustment command.
9. The real-time data-driven UAV pollution monitoring flight path self-adjustment system according to claim 8, characterized in that, The preset nonlinear mapping relationship is as follows: ; in, Adjust the rate to the target heading. This represents the maximum yaw rate of the drone. For concentration gradient information, It is the saturation constant.
10. A real-time data-driven method for self-adjusting flight paths in UAV pollution monitoring, characterized in that, The system applied to any one of claims 1 to 9 includes the following steps: The system acquires raw concentration data collected in real time by the gas sensor on the drone and simultaneously acquires real-time flight status parameters output by the drone's flight control system. The real-time flight status parameters are input into a preset mapping model between flight status and correction factors to obtain the dynamic correction factor output by the mapping model. The original concentration data is corrected using the dynamic correction factor to obtain the first corrected concentration data; Based on the response time constant of the gas sensor, the first corrected concentration data is subjected to delay compensation processing to obtain the second corrected concentration data, wherein the delay compensation formula is: ; Based on the second corrected concentration data with spatiotemporal correlation collected by the UAV during its movement, a local concentration field is constructed, and the concentration gradient information of the local concentration field in the current flight direction of the UAV is calculated. Based on the concentration gradient information, a flight path adjustment command is generated to control the UAV to adjust its flight path, wherein the flight path adjustment rate follows: 。