Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 6, No. 2, 2023 76 Antenna Directional Pattern Testing System Based on Multirotor Unmanned Aerial Vehicles Yuankui Xue, Liang Yu, Long Tang, Lin Chen, Junjie An CETC Special Mission Aircraft System Engineering Co.Ltd, Chengdu, Sichuan province 611731, China Abstract: Obtaining azimuth data of antennas after installation on actual platforms (such as large aircraft, ships, etc.) is crucial for effectively analyzing the platform's impact on the antennas and facilitating optimization and improvement. Traditional testing methods are unable to accurately and efficiently acquire azimuth data due to significant differences between measurements in a dark room and the actual conditions. With the rapid development of drone technology, unmanned aerial platforms have been widely utilized in various engineering fields. Utilizing the flexibility of drones in three-dimensional space and their ability to be precisely controlled through RTK technology, it is possible to use drones equipped with test antennas to measure the azimuth pattern by receiving spectrum signals transmitted by antennas on real platforms. In order to achieve precise angle control, a gimbal system is designed to control the angle of the test antenna. The effectiveness of the entire testing system is verified through experimental results. Keywords: Antenna Azimuth Pattern, Multi-Rotor Drones, Gimbal Control. 1. Antenna Pattern Test System Based on Multi-rotor UAV It is very important to obtain the radiation pattern data of the antenna after it is installed on the actual platform (such as large aircraft, ships, etc.), so that it can effectively analyze the influence of the platform itself on the antenna, and facilitate optimization and improvement. Since the measurement results in the darkroom are quite different from the actual situation and traditional testing methods cannot acquire pattern data accurately and efficiently. With the rapid development of UAV technology, UAV flight platforms have been widely used in various engineering fields, thanks to the ability of UAVs to move flexibly in three-dimensional space and to control their precise positions through RTK technology , you can use the UAV to carry the test antenna to complete the measurement of the pattern by receiving the spectrum signal emitted by the antenna on the real platform. In order to achieve precise angle control, a pan-tilt system is also designed to control the angle of the test antenna. Through the test results The validity of the whole test system is verified. 2. Introduction In a microwave anechoic chamber, various parameters of the tested antenna can be accurately measured and evaluated. However, in practical applications, when the antenna is installed on a carrier (such as a large aircraft, a ship, etc.) or deployed in a specific environment (such as various buildings), the radiation field is influenced by the surroundings and the antenna base, resulting in distortion or changes in the actual antenna performance parameters. This affects the final test results and leads to significant discrepancies compared to the measurement data obtained in the microwave anechoic chamber [1]. In some cases, strict requirements are placed on antenna performance parameters like radiation patterns. The effects caused by the surroundings and the base can severely impact the overall system performance, especially for antennas constructed using modern array technology. If accurate assessment of the actual antenna performance parameters cannot be made in the deployed carrier and environment, and compensations for these factors are not applied, it will inevitably result in decreased and degraded system performance or even system failure. Therefore, after the actual deployment, it is necessary to conduct fast diagnostic tests on the transmit/receive radiation patterns of the tested antenna in order to assist technicians in quickly and accurately identifying and troubleshooting issues. Additionally, the actual test results can be fed back to the research laboratory as input parameters for model corrections. When the tested antenna is deployed, for example, on a large aircraft or ship, traditional methods cannot effectively obtain its radiation pattern data due to spatial limitations. Previously, research groups used tethered balloons for relevant testing, but this method lacked stable control over the balloon position and antenna angle. Moreover, it was difficult to operate, costly, and had low testing accuracy [2]. With the rapid development of drone technology, both domestic and international efforts have been made to use drones for antenna radiation pattern testing. Italian engineers utilized drones to carry antennas and transmit signals for studying the signal reception and operation of radio telescope antenna arrays, thereby validating the VHF/UHF frequency band antenna measurement approach [3]. German researchers used small drones to conduct near-field measurement studies on large antennas, primarily for routine on-site inspections of antenna performance [4]. Spanish researchers conducted near-field measurements using drones with different scanning methods, obtained the far-field radiation patterns through iterative Fourier transform, and performed testing and diagnostic analysis on circularly polarized antenna arrays [5]. Researchers from Beijing Institute of Radio Measurement and Testing qualitatively analyzed various sources of measurement errors for phased array antenna measurements using drones [6]. Researchers from Hangzhou Dianzi University analyzed the influence of drone position accuracy on antenna radiation patterns and introduced a polarization matching factor to compensate for errors [7]. Researchers from Northwestern Polytechnical University conducted large- 77 scale antenna tests using quadcopter drones, achieving trajectory deviations below 0.1m and testing errors less than 1dB through differential GPS positioning [8]. However, most of the aforementioned studies lack detailed descriptions of software and hardware system designs or have limited functionality, making them unable to meet the requirements of generalized antenna radiation pattern testing tasks. Additionally, there is a lack of ground station software, which hampers task planning and real-time display of test results. In this paper, we provide a detailed description of the software and hardware design involved in the radiation pattern testing system, as well as the antenna position and angle control algorithm. To enable real-time control of test results, ground station control software was designed, which allows convenient planning of flight parameters such as altitude, distance, and angle based on the test tasks. It can also simultaneously measure multiple sets of frequency points and display radiation pattern test data in real time, greatly improving testing efficiency. 3. System Design The working principle of the antenna radiation pattern testing system is as follows: an unmanned aerial vehicle [9] carries an auxiliary test antenna to transmit or receive signals, while the antenna under test on the carrier receives or transmits signals. The ground control software is used to set the flight trajectory of the unmanned aerial vehicle and adjust the angle of the auxiliary test antenna relative to the antenna under test in accordance with the testing task. The signal source is controlled to generate signals, and the spectrum analyzer is used to receive the signals. Finally, real-time data is transmitted to the ground control software for display. Taking the measurement of shipborne antennas as an example, the operation is illustrated in Figure 1. Figure 1. Schematic Diagram of Directional Pattern Testing Operation 4. System Components The entire testing system consists of two parts: airborne and ground equipment. The airborne equipment includes a UAV platform (flight control, propulsion system, RTK onboard positioning module), onboard control module, communication module (data link, switch), gimbal, and measurement module (testing instruments, auxiliary test antenna). The ground equipment includes a ground control computer, RTK ground base station, communication module (data link, switch), and measurement module (testing instruments, antenna under test). To achieve general measurement capability, the system design considers the ability to measure both the radiation pattern of the transmitting signals from the antenna under test and the radiation pattern of the receiving signals by the antenna under test. Therefore, when conducting transmit tests, the ground end uses a signal source as the instrument, while the airborne end uses a spectrum analyzer. When conducting receive tests, the ground end uses a spectrum analyzer, and the airborne end uses a signal source as the instrument. 4.1. Airborne Part In this paper, a hexacopter UAV is used as the platform, with PX4 V5+ flight controller for flight control and C-RTK 9PS as the positioning module. To enable data interaction between all devices in the system, a switch with serial port forwarding function is used to establish communication connections. A data link that supports three-layer network communication is selected to facilitate data exchange between the airborne and ground ends. Depending on the testing requirements, a signal source or spectrum analyzer can be chosen as the measurement instrument. The selected instrument supports remote control functionality and SCPI command protocol. The auxiliary test antenna is mounted on the gimbal to control pitch and roll angles, and the commands for gimbal angle and UAV position control are sent by the onboard control module based on the task planning results from the ground control software. The Sunrise X3 Pi is selected as the onboard control module, which supports both network and serial communication. It obtains the UAV's position and velocity through serial communication, and sends control signals to the flight controller for precise position control. The gimbal control and measurement instrument control are achieved through UDP communication. The connection of the onboard equipment is shown in Figure 2. Figure 2. Diagram of Onboard Equipment Connections 4.2. The ground-based part Similar to the onboard part, a switch is also used in the ground-based part to establish communication connections among all devices. The ground control computer runs software to plan the entire mission, configure various parameters, manage device connections, control instruments, and display real-time measurement data. It also sends RTK 78 base station data to the airborne part for high-precision positioning. The connection of the ground-based equipment is shown in Figure 3: Figure 3. Diagram of Ground Equipment Connections 5. Software Design To fulfill the requirements of general testing tasks, this paper has designed ground control software to accomplish functions such as flight path planning [10], parameter configuration, device connection, instrument control, and data recording. Among them, the parameter configuration interface is shown in Figure 4, which includes configuring parameters for the onboard equipment such as IP addresses, communication ports, and the longitude, latitude, and altitude of the antenna under test. Figure 4. Parameter Setting Interface The mission planning interface, as shown in Figure 5, includes configuring parameters such as the circular flight radius, flight altitude, measurement starting frequency, power, and test frequency. By clicking the start/stop button, the mission is generated and uploaded to the onboard control module to initiate the radiation pattern testing. Figure 5. Task Planning Interface The mission display and control interface, as shown in Figure 6, is primarily used to real-time display the drone's position, signal power, and azimuth angle. It also sends flight control commands to the drone, such as takeoff, landing, and start circling. Figure 6. Task Display Interface 6. Antenna Position and Angle Control 6.1. Position Control To obtain the radiation pattern data, it is necessary for the drone to fly in a circular path with the antenna under test at the center. In the PX4 flight controller, the functionality of circular flight, known as "do_orbit," has already been implemented. By sending the MAV_CMD_DO_ORBIT (34) MAVLink control command to the flight controller through the onboard computer, the circular flight can be initiated. This command includes seven parameters: Radius (to set the circular radius), Velocity (to set the speed), YawBehavior (selecting ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRC LE_CENTER to keep the drone's front facing the circle center), Orbits (2*PI for one complete circle), Latitude (longitude of the circle center), Longitude (latitude of the circle center), and Altitude (altitude of the circle center). 6.2. Angle Control In practical testing, the auxiliary test antenna installed on the gimbal of the drone needs to maintain a certain relative angle with the antenna under test. Generally, the normal direction of the auxiliary test antenna is aligned towards the antenna under test, as shown in Figure 7: Figure 7. Antenna Angle Control The pan tilt is controlled by a two axis servo [11], which can set the pitch angle and roll angle. Based on the right-hand coordinate system, it is defined AAA  ,, as the pan tilt antenna roll angle, pitch angle, and yaw angle, as well as 79 defined DDD  ,, as the drone roll angle, pitch angle, and yaw angle [12].To avoid the obstruction of the signal by the tripod, always keep the drone nose facing the center of the circle (i.e. the direction of the antenna to be tested) during testing, Therefore DA   .In addition, in order to offset the roll angle of the drone. Therefore, DA   .The horizontal elevation angle can be obtained based on the horizontal distance and flight altitude of the drone relative to the tested antenna )/arctan( dh .Therefore, the calculation shows that the pitch angle of the pan tilt antenna is DA   )( . 7. Experimental Instructions In order to verify the functionality and performance indicators of the entire system, real outdoor flight experiments were conducted at Fengming Airport in Zigong. A hexacopter drone was used to carry all the test equipment, and the entire mission planning was performed using ground station control software. The onboard and ground-related equipment are shown in Figure 8. Figure 8. Operating Equipment The testing task here was set to measure the directional pattern of the receiving antenna. The ground antenna under test was directly connected to the spectrum analyzer and placed in the center of the testing area, as shown in Figure 9. There were two measurement frequencies: 1246MHz and 1256MHz. The designed flight altitude of the drone was 5 meters, with a circular radius of 10 meters. The flight speed was set at 1m/s, and measurements were taken every 0.1 seconds. Figure 9. Flight Test The ground testing software received real-time measurement data and generated the directional pattern plot. The final result is shown in Figure 10. Figure 10. Directional Diagram Test Data Results 8. Conclusion This paper focuses on the study of antenna directional pattern testing and designs a universal testing platform system based on multi-rotor unmanned aerial vehicles. According to the requirements and characteristics of directional pattern testing, a drone flight platform and specialized gimbal are designed to control the spatial distance and angle between the auxiliary testing antenna and the antenna under test. Ground control software is also developed to set flight tasks and various parameters. Through actual flight experiments, it has been demonstrated that the drone's flight trajectory and gimbal control angles have high precision. The measured antenna main lobe direction closely aligns with the far-field values, indicating that the system is capable of effectively performing antenna directional pattern testing tasks. It offers advantages such as high precision, high efficiency, low cost, and universality, making it suitable for various antenna testing applications. References [1] Yan, Z., Liu, W., Tang, J., et al. Design of an Antenna Testing System Based on Unmanned Aerial Vehicles. Journal of Microwaves, (2020).36(S1), 376-379. [2] J. Steele, Measurement of antenna radiation patterns using a tethered balloon[J]. IEEE Transactions on Antennas and Propagation, 1965,13(1):179-180. [3] G. Virone, M. Lingua. Antenna pattern verification system based on a micro unmanned aerial vehicle(UAV)[J]. IEEEE Antennas and Wireless Propagation Letters, 2014(13):169-172. [4] T. Firtzel, R.Straub, H J.Steiner et al. Introduction into an UAV-based near-field system for in-situ and large-scale antenna measurements[C]. IEEE Conference on Antenna Measurements & Applications, 2016:1-3. [5] Garcia-Fernandez M, Alvarez-Lopez Y, Las-Heras F. UAV- based antenna measurement and diagnostics for circularly polarized antenna arrays[C]. IEEE International Symposium on Antennas and Propagation.2018:525-526. [6] Suo, W., & Song, Y. Research on Antenna Array Directional Pattern Testing System using Unmanned Aerial Vehicles. Aerospace Measurement Technology, (2018). 38(1), 6. [7] Zhang J, Shuang Q, Chen Z,et al. Research on the Measurement of Antennas Radiation Characteristics Based on Small Unmanned Aerial Vehicle Platform[J].Procedia Computer Science, 2018, 131:462-468. [8] Ma, S., Lu, Y., Liu, K., et al. Research on High-Precision Antenna Testing Method Based on Small Unmanned Aerial 80 Vehicles. Chinese Journal of Scientific Instrument, (2019).40(05), 36-42.. [9] Xue, Yuankui. Attitude Fusion and Navigation Methods for Small Rotary-wing Unmanned Aerial Vehicles (Doctoral dissertation). Chengdu: University of Electronic Science and Technology of China, (2016). 5-20. [10] Qian, J. Overall Design of Quadcopter and Ground Station Software for Trajectory Tracking (Master's thesis). University of Electronic Science and Technology of China. (2015). [11] Yu, B., Yi, H., Hou, Y., et al. Design of Two-axis Gimbal Structure for Multirotor Unmanned Aerial Vehicles. Journal of Mechanical Engineering and Technology, (2021). 50(09), 61- 65+83. [12] Chen, L. Design of Automatic Control System for Small Quadrotor Helicopter (Master's thesis). Chengdu: University of Electronic Science and Technology of China, (2014). 10-26.