Design of Meteorological Element Detection Platform for Atmospheric Boundary Layer Based on UAV

Among current detection methods of the atmospheric boundary layer, sounding balloon has disadvantages such as low recovery and low reuse rate, anemometer tower has disadvantages such as fixed location and high cost, and remote sensing detection has disadvantages such as low data accuracy. In this paper, a meteorological element sensor was carried on a six-rotor UAV platform to achieve detection of meteorological elements of the atmospheric boundary layer, and the influence of different installation positions of the meteorological element sensor on the detection accuracy of the meteorological element sensor was analyzed through many experiments. Firstly, a six-rotor UAV platform was built through mechanical structure design and control system design. Secondly, data such as temperature, relative humidity, pressure, elevation, and latitude and longitude were collected by designing a meteorological element detection system. Thirdly, data management of the collected data was conducted, including local storage and real-time display on ground host computer. Finally, combined with the comprehensive analysis of the data of automatic weather station, the validity of the data was verified. This six-rotor UAV platform carrying a meteorological element sensor can effectively realize the direct measurement of the atmospheric boundary layer and in some cases can make up for the deficiency of sounding balloon, anemometer tower, and remote sensing detection.


Introduction
The current detection methods of the atmospheric boundary layer include sounding balloon, anemometer tower, radar detection, and so on [1,2].Among which, conventional sounding balloon and captive balloon have some limitations in the detection of the atmospheric boundary layer due to disadvantages such as low recovery and low reuse rate.The observational approaches of radar detection and remote sensing detection can only obtain relatively low accuracy and reliability of data [3].Anemometer tower has difficulty in giving consideration to the purpose of research on the atmospheric boundary layer due to disadvantages such as fixed location and high cost.Above all, to seek a high stability and low cost, continuously used detection instrument for the atmospheric boundary layer is an urgent problem to be solved.By virtue of features such as easy landing, automatic cruise, constant height, and constant point [4], it is possible that a meteorological element sensor is carried on a sixrotor UAV (unmanned aerial vehicles) platform to realize the direct measurement of atmospheric sounding.Therefore, developing a meteorological element detection platform for the atmospheric boundary layer based on UAV has important scientific significance.
Among current detection methods of atmospheric sounding, sounding balloon carrying a radiosonde for direct measurement is an important means; however, conventional sounding balloon and captive balloon have low detection accuracy of the atmospheric boundary layer due to disadvantages such as low recovery and high cost along with low altitude airflow and terrain environment, so they cannot meet the needs of modern meteorological applications.Therefore, by virtue of features such as easy vertical takeoff and landing, high positioning accuracy, and reusability, it is possible that a meteorological element sensor is carried on a six-rotor UAV platform to make up for the deficiency of sounding balloon in some cases.The observational approaches of radar detection and remote sensing detection obtain meteorological parameters through inversion and observation of indirect variables, and it can only obtain relatively low accuracy and reliability of data relative to physical measurement; therefore, it is possible that a meteorological element sensor is carried on a six-rotor UAV platform to realize the direct measurement of atmospheric boundary layer.Anemometer tower is a facility to observe the vertical distribution of meteorological elements of the atmospheric boundary layer but has difficulty in giving consideration to the purpose of research on the atmospheric boundary layer due to disadvantages such as fixed location and high cost.Therefore, detecting the atmospheric boundary layer with an UAV has advantages of low cost and good mobility [5][6][7][8][9][10].
At present, many research achievements have been made in this field: the United States, Australia, France, and China have developed UAV meteorological remote sensing systems, such as Perseus, Theseus, and Aerosonde.Aerosonde Ltd. is an Australian-based developer and manufacturer of unmanned aerial vehicles; in 1995, it started to provide products and services related to UAV meteorological detection system, taking the leading position in this field.Reuder et al. observed the meteorological elements of the atmospheric boundary layer such as temperature, humidity, and pressure by using SUMO, a small fixed-wing UAV, and achieved good results [11].China has done a lot of work in this field and has achieved preliminary results.However, performing atmospheric sounding with a fixed-wing UAV has deviation in the measurement of meteorological data because the fixed-wing UAV will shift substantially on windy days during uniform straight up.In contrast, a multirotor UAV can fly straight up and down on windy days and has better applicability than a fixed-wing UAV, so it can perform meteorological detection of atmospheric layer of different height [12,13].The commonly used multirotor UAVs include four-rotor UAV and six-rotor UAV, among which, the six-rotor UAV has two additional rotors compared with four-rotor UAV; thus, it can exhibit better stability when it experiences strong external disturbance or part of the rotor is disturbed [14].Therefore, in this paper, firstly, a six-rotor UAV platform was built through mechanical structure design and control system design; secondly, data such as temperature, relative humidity, pressure, elevation, and latitude and longitude were collected by designing a meteorological element detection system; thirdly, data management of the collected data was conducted, including local storage and real-time display on ground host computer [15]; and finally, combined with the comprehensive analysis of the data of automatic weather station, the validity of the data was verified.

Design of Overall System Scheme
The overall system included four parts, namely, six-rotor UAV platform design, meteorological element detection system design, data management and system testing, and data analysis and contrast verification, and the relationships between the parts are shown in Figure 1.Firstly, a six-rotor UAV, as the flight carrier of detection system, carried a meteorological element detection system to achieve detection of meteorological elements of the atmospheric boundary layer.Secondly, the collected data were saved in the SD card and sent to the host computer for real-time display through the wireless data transmission module at the same time.Finally, the comprehensive analysis of the data of automatic weather station was conducted, and contrast verification by experiment was conducted.The parts are described below: In this paper, combining the design method of six-rotor UAV flight control system with the design method of meteorological element detection system, the meteorological sounding of atmospheric boundary layer was studied, on this basis, combined with the comprehensive analysis of the data (1) Six-rotor UAV technology mainly adopted mechanical structure design, Mahony complementary filter algorithm design [16], and hardware and software design.
The aerodynamic layout of six-rotor UAV had a great influence on the control characteristics and flight quality.Therefore, firstly, the mechanical structure design was conducted using Solid Works software.Secondly, the master control conducted programming of flight control system software using STM32 series chips under MDK (Microcontroller Development kit) development environment through Mahony complementary filter algorithm design and other designs, and the design of the main program completed the overall function by means of interrupt nesting.Finally, the hardware circuit and PCB (printed circuit board) layout were designed using Altium Designer software, including board processing, welding and debugging, and model six-rotor UAV building.
(2) Meteorological element detection system technology included hardware design, program design, host computer design, and data management.
The master control of the meteorological element detection system collected the data of temperature and humidity sensor, pressure sensor, and GPS sensor using STM32 series chips, among which, the hardware design and software program design were conducted using Altium Designer software under KEIL environment.As for data management, the meteorological data were displayed by designing the host computer software using Visual Basic and saved in the SD card in the form of file system.
(3) As for data analysis and experimental comparison, the system test and contrast test were conducted in the simulation environment, and the influence of different installation positions of the meteorological element detection system on the data was analyzed.
In this experiment, under the standard environment simulated by a split-type precision humidity generator, firstly, the temperature and humidity of the meteorological element detection system board were tested and analyzed under different conditions.Secondly, in light of the influence of the rotor wind of six-rotor UAV on the detection accuracy of the meteorological element sensor during the detection of atmospheric boundary layer, the influence of different installation positions of the meteorological element sensor on the detection accuracy of the meteorological element sensor was analyzed through many experiments.Finally, in the simulation environment, the temperature and humidity of the meteorological element detection system board and DAVIS weather station collection board were tested; in the actual test, the meteorological elements such as temperature, relative humidity, pressure, elevation, and latitude and longitude were detected by a six-rotor UAV platform carrying a meteorological element sensor and DAVIS weather station collection board, and the validity of the data was verified through many experiments.

Design of Six-Rotor UAV Platform
In light of the influence of meteorological element detection system carried on a six-rotor UAV and other loads on the stability of six-rotor UAV, on the basis of open-source platform, a six-rotor UAV platform of high reliability was built through the optimization of mechanical structure design.The main research contents included the design of six-rotor UAV mechanical structure, design of control system hardware, software design, and design of the host computer of the ground station.
3.1.Design of Six-Rotor UAV Mechanical Structure.The design of six-rotor UAV mechanical structure included aerodynamic layout design and material selection.The six-rotor UAV was a fully actuated system with six outputs and six freedoms of motion.The aerodynamic layout design was the premise for good flight performance of six-rotor UAV; therefore, the aerodynamic layout of the six-rotor UAV designed in this paper chose X6 structure.The aerodynamic layout and assembly of six-rotor UAV platform are shown in Figures 2 and 3.
The design of six-rotor UAV platform required the assembly of multiple parts, such as center plate of six-rotor  3 International Journal of Aerospace Engineering UAV frame, shaft arm, flight control placing board, screw, and nut, as shown in the following figure.The length of the wheelbase was 650 cm, the shaft arm was designed as a square of 15 cm × 15 cm, and the center plate of six-rotor UAV frame and shaft arm were fixed with screws and nuts.Through the assembly of multiple parts, a six-rotor UAV platform was built; on this basis, brushless motor, ESC (electronic speed control), and propeller were assembled, and the X6 structure of six-rotor UAV had better reliability than other structures.

Design of Flight Control
Circuit.The correct design of hardware circuit was the premise for stable flight of six-rotor UAV.With modular design method being adopted, a meteorological element detection system was carried on the six-rotor UAV flight control system studied in this paper to perform atmospheric sounding on the premise of ensuring reliable flight of six-rotor UAV.The six-rotor UAV system structure is shown in Figure 4.
The six-rotor UAV flight control system circuit included main controller circuit, filter circuit, reset circuit, crystal   4 International Journal of Aerospace Engineering oscillator circuit, power interface circuit, serial port circuit, GY-86 attitude sensor circuit, OLED display interface circuit, remote control interface circuit, motor output circuit, and status indicator circuit.The normal operation of each module circuit was the premise for stable flight of six-rotor UAV.The six-rotor UAV system circuit and PCB wiring are shown in Figures 5 and 6.By adopting the above circuit design, the PCB circuit was designed using Altium Designer10 software, and the flight control board was designed as a square.The main control chip and attitude sensor were located at the center of the flight control board; thus, the six-rotor UAV had easy access to real attitude information, and the coordinate axis of attitude sensor was coincident with that of six-rotor UAV frame.
3.3.Software Design.Based on the above design, the master control conducted programming of UAV flight control system software using STM32 series chips under MDK development environment, and the design of the main program completed the overall function by means of interrupt nesting.The core of the program was that three interruptions (200 Hz, 50 Hz, and 10 Hz) were set up by timers in the main cycle, namely, scanning the remote control command once, updating the attitude sensor data once, and updating the motor control once to realize control.
After initialization of flight control system, first, the original data of remote control were obtained, and the throttle was added to data processing to obtain the desired attitude angle.Meanwhile, the real-time attitude angle of UAV was obtained using attitude solution algorithm for three axis acceleration and angular velocity acquired by the attitude sensor; then, the desired attitude angle and real-time attitude angle were input into a PID controller for operation to obtain the PID outputs of the three attitude angles.The control flow of control motor after ESC was input is shown in Figure 7.
The flight control system designed in this paper obtained accurate attitude information through the attitude calculation of six-rotor UAV software using Mahony complementary filter algorithm.The attitude calculation is shown in Figure 8.
First, low-pass filtering and normalization of acceleration output by MUP6050 gyroscope were conducted to obtain the unit acceleration.Second, four elements ranging from geographic coordinate system to body coordinate system were converted into direction cosine matrix; then, vector product operation between gravity vector (ax,ay,az) measured by the accelerometer on the body coordinate system and gravity vector (vx,vy,vz) calculated before was conducted to obtain the attitude error (ex,ey,ez) between the two, which was used as the PI-modified gyro bias to obtain the modified angular  velocity (gx,gy,gz).Finally, the quaternion differential equation was solved using the first-order Runge-Kutta method to obtain the quaternion and then the quaternion was converted into Euler angle.
In this paper, the attitude control algorithm adopted a double closed loop PID attitude controller, as shown in Figure 9.The main function of this part mainly read attitude sensor data for solution and control.This design adopted the soft solution posture, and the data read were AD (analog to digital conversion) values of accelerometer and gyroscope; after calibration, filtering, and correction of the data, the three axis Euler angle was obtained by fusing the four elements.However, the data acquired by the acceleration sensor were susceptible to distortion, resulting in wrong attitude angle through attitude calculation.It was difficult for the system to operate stably when only using a single loop, so the angular velocity was added as the inner loop, which was output through data acquisition by the gyroscope.The data acquired by the gyroscope were generally free from external influence, with strong anti-interference ability; in addition, the angular velocity was sensitive to variation, and its rapid recovery from external disturbance enhanced the robustness of the system.
The six-rotor UAV was a three-dimensional coordinate (x,y,z) in the air, and it had requirements for two dimensions to stay in the air.The first dimension was horizontal direction (x,y,0) in which the six-rotor UAV cannot move back and forth or left and right, and the second dimension was vertical direction (0,0,z) in which the six-rotor UAV cannot run out of altitude.There were different technical solutions to these two dimensions.In the horizontal direction, to determine the position of the six-rotor UAV, GPS positioning was generally used; in the vertical direction, height was determined using a pressure gauge.The six-rotor UAV required self-stability and absolute coordinates in the air to achieve positioning, and the barometer adopted in this paper was MS5611, a high precision barometer, which can achieve z-axis positioning in the air.On the z-axis, firstly, the pressure collected by the pressure sensor was calculated and corrected; secondly, the accurate pressure was obtained through second-order temperature compensation; and finally, the absolute height of relative takeoff point was obtained using the transformation formula.Because the accuracy of pressure sensor MS5611 was 10 cm, it was necessary to fuse the accelerometer complementary filter to obtain the appropriate height, z-axis speed, and acceleration.In this design, a height double-loop PID controller was formed with height as the outer ring and speed as the inner ring, and the altitude hold of z-axis was achieved by adjusting the output throttle.The position controller is shown in Figure 10.

Design of Meteorological Element Detection System
At present, the basic meteorological elements in the detection of atmospheric boundary layer included temperature, humidity, pressure, wind speed, wind direction, and precipitation.The precipitation was generally measured using a rain measuring glass and measuring cup, which was a static measurement, while the measurement of wind speed and wind direction was greatly influenced by the rotor wind of six-rotor UAV.Therefore, in this paper, a meteorological element detection system was designed based on the actual demand of meteorological detection, and the three elements (temperature, humidity, and pressure) as well as elevation and latitude and longitude were measured.The system structure is shown in Figure 11.
4.1.Circuit Design.The hardware circuit was the basis of the overall detection platform, and its design needed to consider many aspects, including working environment and selection of component models, and only the reasonable design of the overall hardware circuit can complete the work of hardware system of this detection platform.With modular circuit design method being adopted, the circuits were connected through Place Net Label, and the circuits as a whole were 6 International Journal of Aerospace Engineering simple, intuitive, and readable, as shown in Figure 12.The circuit board of the meteorological element detection system designed the position of the meteorological element sensor to ensure a secure position of the meteorological element sensor, and the square design in the bottommost corner of PCB circuit board was mainly the reserved slot position of memory card, as shown in Figure 13.The meteorological element detection system circuits included controller circuit, reset circuit, crystal oscillation circuit, BOOT setting circuit, power supply circuit, AM2320 circuit, BMP180 circuit, GPS interface circuit, SD card storage circuit, and USB serial port conversion circuit.Among which, the USB serial port conversion circuit had multiplex functions, which can be used for program flash port or wireless data transmission module interface.

Program Design.
The meteorological element detection system circuits included temperature and humidity collection, pressure acquisition, and geographic coordinate acquisition.The communication mode of the meteorological element detection sensor was as follows: temperature and humidity were transmitted through single bus, pressure was transmitted through I2C, and elevation, latitude and longitude, and Beijing time were transmitted through serial port.The program design included pin configuration, communication interface initialization, data format conversion, data processing, and data storage.The program flow is shown in Figure 14.
The temperature and humidity were acquired with a AM2320 sensor.In the communication process, the data bus was pulled down 18 ms from the controller, and   7 International Journal of Aerospace Engineering AM2320 sensor was converted from sleep mode to highspeed mode and sent response signal after waiting the start signal from the controller to end; it sent 40-bit data from the data bus, after which the information acquisition was triggered once, and after the information collection ended, AM2320 sensor automatically entered sleep mode to wait for the next communication.The communication process is shown in Figure 15(a).
The pressure was acquired with a BMP180 pressure sensor and communicated via I2C.When the BMP180 pressure sensor started working, it read the data of pressure sensor from the I2C interface of the controller, then conducted As for geographic coordinate acquisition, the elevation, latitude, and longitude were acquired with a NEO-6M GPS sensor and then decoded through a NMEA base.The data were communicated from serial port 2 (USART2) of STM32F103VET6 controller through serial port and sent to memory from peripheral (serial port 2) of STM32F103VET6 controller through direct memory access (DMA).The communication process is shown in Figure 15(c).
In this paper, a meteorological element detection system was designed, and the three elements (temperature, humidity, and pressure) and elevation, latitude, and longitude were collected and saved in the SD card from the controller.Meanwhile, the data were sent to the host computer of the meteorological element detection system through the wireless data transmission module for real-time display.

Design of Host Computer
Software.The core task of the host computer software of the meteorological element detection system designed in this paper was to display, process, and store data, as shown in Figure 16.
The host computer software communicated with the meteorological element detection system through the wireless data transmission module, which was convenient for the data transmission of meteorological elements.In addition to the operating system, there was no need to configure other software environment.This host computer was written using Visual Basic, and the interfaces included serial port parameter setting, real-time data display, time data, historical data query, and various function keys, which can realize the function of receiving and displaying meteorological elements.
The data of the host computer software and meteorological element detection system were transmitted through serial port; in the connection mode, the transmitting terminal of wireless data transmission module was connected with the meteorological element detection system, and the receiving terminal was connected with the ground PC terminal (computer), and the data were sent to the host computer for real-time display from the meteorological element detection system through the serial port communication between wireless data transmission modules.The meteorological element detection system conducted design of communication protocols for the transmitted data, including frame header, data length, data block, check, and frame tail, so as to ensure the integrity of the data.The protocol rules are shown in Table 1.

Building of Complete Six-Rotor UAV
The building of model six-rotor UAV was the premise for normal operation, and function requirements can be realized through welding, debugging, final checking function, and various indicators of the complete six-rotor UAV.The flight control board of six-rotor UAV is shown in Figure 17(a), and the meteorological element detection board of six-rotor UAV is shown in Figure 17(b).
In this paper, through hardware and software debugging, a meteorological element detection system was carried on a six-rotor UAV platform to achieve collection of meteorological elements of atmospheric boundary layer, such as temperature, relative humidity, pressure, elevation, latitude and longitude, and current time, and the collected data were saved in the SD card; meanwhile, the data were sent to the host computer of the meteorological element detection system through the wireless data transmission module for real-time display.In the test flight experiment, the six-rotor UAV platform maintained stable flight, and the collection and storage of meteorological elements by the meteorological element detection system as well as real-time display on the host computer were realized, as shown in Figure 18.
As can be seen from flight waveform in Figure 19, the six-rotor UAV platform carrying a meteorological element detection system showed small fluctuation of attitude angle during flight, which was around 0.4 °, proving that the six-rotor UAV flight control platform designed in this paper had good self-stability effect.

Analysis of Experimental Data
To ensure the correctness and validity of data analysis, first, the influence of different installation positions of the meteorological element sensor on the data analysis result was analyzed, then, the meteorological elements were detected and the data were analyzed by a six-rotor UAV platform carrying a meteorological element detection system and DAVIS weather station collection board, and the validity of the system was verified.According to the survey, the experiment mainly conducted an analysis of detection data of three different installation positions of the meteorological element detection system.Through hydrodynamic analysis, the meteorological element detection system was installed below, above, and 10 cm above the center plate of six-rotor UAV frame.The test data of this experiment are shown in Figure 20.
The experimental data selected the test data in 10 minutes in the experimental test, and analysis of temperature, humidity, and pressure was conducted, respectively.As can be seen from Figure 20, when the meteorological element detection system was installed above and below the center plate of six-rotor UAV frame, the temperature and humidity curves showed large fluctuation, and the pressure curve showed small fluctuation; when the meteorological element detection system was installed 10 cm above the center plate of six-rotor UAV frame, the temperature and humidity curves showed smooth fluctuation, and the pressure curve showed small fluctuation.
In the experiment, when the meteorological element detection system was installed above and below the center plate of six-rotor UAV frame, the temperature and humidity curves showed large fluctuation, because of influence of the International Journal of Aerospace Engineering downward rotor wind of six-rotor UAV as the positions above and below the center plate of six-rotor UAV frame were below the propeller; when the meteorological element detection system was installed 10 cm above the center plate of six-rotor UAV frame, the temperature and humidity curves showed smooth fluctuation, because of little influence of the rotor wind of six-rotor UAV as the position 10 cm above the center plate of six-rotor UAV frame was above the propeller.Therefore, the meteorological element detection system was installed 10 cm above the center plate of UAV frame.

Contrast Test.
The meteorological elements such as temperature, humidity, and pressure were detected by a six-rotor UAV platform carrying a meteorological element and DAVIS weather station collection board, and the experimental data selected two sets of test data in 10 minutes in the experimental test, as shown in Figure 21.
As can be seen from Figure 21, the temperature and humidity curves and pressure curve were consistent with the trend of curve of the data collected by the DAVIS weather station, which met the design requirements.As can be seen from Figure 21(a), the error between the temperature curve of the meteorological element detection system and the temperature curve of the DAVIS weather station was about 0.5 °C, which was in line with the margin of error of temperature accuracy.Figures 21(c) and 21(d) show that the humidity curves of the meteorological element detection system and the DAVIS weather station were basically coincident with each other.Figures 21(e) and 21(f) show that the pressure curves of the meteorological element detection system and the DAVIS weather station showed certain fluctuation and the overall trends were the same due to the small fluctuation, so the data were valid.

Conclusions
In this paper, a meteorological element detection system was carried on a six-rotor UAV platform to achieve collection and analysis of meteorological elements of the atmospheric boundary layer.The main works were summarized as follows: (1) In light of the influence of meteorological element detection system carried on a six-rotor UAV and other loads on the stability of six-rotor UAV, the     (2) In light of the detection requirements of the atmospheric boundary layer, a meteorological element detection system was designed to achieve detection and storage of meteorological elements such as temperature, relative humidity, pressure, elevation, and latitude and longitude.In view of the influence of the rotor wind on the detection accuracy of the meteorological element detection sensor, the installation location is spatially higher than the propeller plane, and the influence of the rotor wind is the smallest.Through a large number of experimental studies, it is found that the installation position is 10 cm above the frame, and sensor accuracy can be achieved: temperature accuracy: △T ≤ 0.5 °C; humidity accuracy: △U ≤ 6RH%; air pressure accuracy: 0.5 hPa; altitude: 3 M, to ensure the accuracy of the detection results.It reveals the position relation between unmanned aerial vehicle and meteorological sensor, which is of great significance to guide the system structure design.13 International Journal of Aerospace Engineering (3) In light of the meteorological elements collected, the temperature, humidity, and air pressure were analyzed by automatic weather station data.The temperature curve, humidity curve, and air pressure curve were consistent with the trend of data curve collected by DAVIS weather station, and the validity of the design was clarified.

12
International Journal of Aerospace Engineering flight stability of six-rotor UAV was improved through the optimization of attitude controller and position controller.