{'fraction_non_alphanumeric': 0.0186511240632806, 'fraction_numerical': 0.008159866777685262, 'mean_word_length': 4.559340862803184, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Design and Implementation of an Agricultural UAV With Optimized Spraying Mechanism

. Agricultural UAVs are growing and developing rapidly throughout the whole world due to its extensive advantages. Agricultural drones are transforming on the way farming is being carried out. They are very suitable and agile for working in a large area of land and rough terrains with high efficiency. Agriculture drones are much bigger in size where they will have a larger and wider spraying span. They can increase and improve the efficiency of spraying more area of land in a shorter duration compared to a knapsack sprayer. The entire research design is based on quantitative research, which was conducted through simulation using SolidWorks, MATLAB and Ansys Fluent. SolidWorks was used for planning, modelling and visual ideation of the agricultural drone. Each of the individual components of the agricultural drone was measured, sketched and designed. MATLAB was used to simulate the agricultural drone to fly in a specific pattern to water a certain area. Velocity, acceleration, position and flight pathway graphs were plotted. These data were collected to observe how evenly the entire area being sprayed is fully covered. Ansys Fluent was used to display the velocity that the fluid will be flowing inside the nozzle and spraying it out.


Introduction
In this era of modern technologies, the structure of rural labour force throughout the whole world has changed drastically. It has increased the contradiction regarding the demand and lack of rural labour force available therefore agricultural equipment with higher efficiency is sought after in order to serve for the agricultural production. Besides that, crop diseases and pests are major factors affecting the quality and yield of crops. Chemical pesticides will be the main solution in order to control and prevent this from happening. The selection of the equipment to be used is a critical factor for chemical pest control. In China, there are more than 88% of manually operated sprayers that includes manual air-pressure or electric knapsack sprayer and knapsack mist-blower sprayer [1]. The quality of the spraying process mainly depends on the skill of the sprayers.
In 2010, the market of drones is estimated to be around 4.9 billion USD. Based on analytical data, business services that are using drones have been valued to grow to approximately 127 billion USD. The agricultural industry has embraced drone technology where these advanced tools are being used to modernise the traditional farming.
Agricultural drones are transforming the way farming is being carried out. Nowadays, while the demand is set to grow, farmers must consider a variety of complex factors which will impact the success of their agriculture businesses or farms ranging from the water access to soil quality, rainfall patterns, temperature, changing climate, wind, the presence of weeds and insects. Farmers must continue to innovate in order to improve and maintain the productivity to meet the demands. Digital technologies have huge potentials to provide farmers with all the required data to seize the opportunities for growth and meet these challenges. Consequently, farmers are reaching out to agricultural drone technology in order to help mitigate these problems.
The demand of UAVs has increased and are used for a various type of missions [2]. Digital agriculture is defined as the use of digital technology to integrate agricultural production from the paddock to the consumer. Digital agriculture also uses the most advanced and latest technologies which are integrated into one system to enable farmers and other stakeholders within the agriculture value chain to improve production [3]. The UAV can be piloted autonomously via flight control software or manually via transmitter [4]. Advanced agricultural drones will allow farmers and the drone pilots that operate them to improve and increase the efficiency in certain aspects of the farming process. These aspects range from crop planting to monitoring, crop spraying, livestock management and irrigation mapping. The digital technologies used can provide the agricultural industry with all the necessary information and tools to make more informed decisions. Agriculture spraying drones are much bigger in size where they will have a larger and wider spraying span. They can increase and improve the efficiency of spraying more area of land in a shorter duration compared to a knapsack sprayer. Moreover, the variable spray technology used by the agricultural UAV can be applied on demand therefore it has definite potential and prospects. Once the drone technology is implemented, agriculture businesses and farms can save time and increase crop yields which will improve long-term success.
An agricultural UAV shown in Figure 1 is able to maintain low speed and height in order to obtain better droplet coverage. The rotating rotors will generate downwash flow which may minimise the drifting of the droplets and the up flow which is generated by the downwash flow will allow the droplets to land on the reverse side of the leaves. In addition to that, the downwash will also create a vortex of different sizes depending on the height and velocity [5]. The lower the flight height and flying velocity, the more obvious the vortex will be resulting in higher deposition of water being sprayed at the crops. This will ensure that the area that is being sprayed is fully covered. The operator has maximum flexibility in terms of modifying or changing the spraying mechanism. The user can change any spraying components such as the size and type of nozzle, length of rod, flow rate and spray area in order to obtain maximum spraying efficiency. The entire operating cost of an agricultural UAV is relatively less compared to a knapsack sprayer. The only operation cost will be the operator and to replace the faulty components [6]. Most of the components are fairly low cost and easy to obtain therefore it is very easy to conduct any repair works. It also does not need to pay any airport taxes as it is able to land almost anywhere.
Agricultural UAVs have a huge advantage in terms of mobile capability over ground vehicles [7]. It has the capability to replace the traditional knapsack sprayer and its spraying speed is 40 times faster. Not only that, it will also save 90% on water and 30%-40% on pesticide. This will greatly reduce the amount of water needed and wastage which results in 97% reduction of the total cost. Wheat and soybean farmers could save an estimated 1.3 billion USD yearly by using agricultural UAV to reduce input costs and increase crop yields. Based on a report published by a drone service provider company, Informa Economics and Measure, they have claimed that corn producers should be the biggest beneficiaries of the agricultural UAV, with the total savings on an average of 11.58 USD per acre. Soybeans and wheat have lower input costs when compared with corn, would have lesser benefits seeing returns of 2.28 USD and 2.57 USD respectively. The crop yields would increase by about 2.5% for corn and soybeans whereas it would be 3.3% for wheat. As a result, there will be a very high return of investment (RoI) rate from using the agricultural UAV in the agriculture sector. In developed countries, the RoI will sum up to about 146%.
Many academic research institutes have a growing interest in such vehicles due to its high research value and application potential [8,9,10]. In this research work, an intelligent, closed-loop autonomous spraying mechanism for agriculture UAV was designed, developed and implemented. The designated area and flight pathway of the agriculture drone was created and determined. At the end of the research work, the algorithm and nozzles were implemented to the spraying mechanism as a case study and design verification.

Methodology
The entire research design is a quantitative research which will be conducted through simulation using a computer-aided and solid modelling engineering software, SolidWorks, a multi-paradigm numerical computing environment and proprietary programming language, MATLAB and a 3D design and fluid simulation software, Ansys Fluent.

Designing and Simulating the Agricultural Drone in SolidWorks
At the initial stage, SolidWorks is used for planning, modelling and visual ideation of the agricultural drone. Note that SolidWorks Premium 2019 was used in this simulation. Through the simulations carried out in SolidWorks, it saved a lot of time and money as it does not cost anything for every mistake made. Each of the individual components of the quadcopter frame is measured, sketched and designed. The frame of the quadcopter is based on the Tarot 650. After all of the individual components have been successfully created in SolidWorks, they are assembled and combined to become the frame of the quadcopter. The modelling of the completed agricultural drone is created in SolidWorks where trial and errors can be made to improve it after assembly. Simulation is carried out under the Motion Study section to observe the functionality of the agricultural drone.

Simulation of Flight Pathway Taken by Agricultural Drone
MATLAB is used for the simulation of the drone flying trajectory as shown in Figure 6. Note that the version of MATLAB used in this simulation is R2020b. The code is designed to simulate the agricultural drone to fly in a specific pattern, height and speed to water a certain area. The agricultural drone's velocity, acceleration and position is calculated. If the MATLAB code has zero errors, it is able to calculate all of the parameter mentioned and hence plotting the final trajectory graph of the agricultural. From the graph plotted, the spraying efficiency can be observed. As shown in Figure 3, there are 3 pre-set initial conditions at the start of the code where dt is the time step for simulation, a_lim is the maximum acceleration and pre_rad is the turning radius. These parameters are changed based on the physical of the drone. For instance, a larger drone will have a large acceleration and radius of turning.

Fig. 3. Pre-set initial conditions
Based on Figure 4, the code will first prompt the user for the desired x and y starting point followed by the x and y ending point. The starting and ending points are set for the agricultural drone to fly in a specific pattern and the size of the location being sprayed can be envisioned. In this case, both the x and y start point were set to be the desired starting point. After that, both the x and y end point were set accordingly as shown in Figure 5. Once the required parameters are determined, all the specified graphs will be plotted, and number of turns required will be calculated.

Simulation of Internal Flow Inside A Nozzle
Ansys Fluent is used for the simulation of the spraying process of the nozzle as shown in Figure 8. Note that the version of Ansys Fluent used in this simulation is Ansys 2020 R2. Firstly, the nozzle is designed and sketched in 3D for easy visualisation. Next, the turbulent model which can provide the best flow of fluid is chosen. The nozzle is simulated with a selected velocity at the inlet and specific spraying pattern is sprayed at the outlet. From the simulation results, an analysis and conclusion can be made whether the water is spray evenly or not.

Geometry
First and foremost, DesignModeler was selected to sketch out and design a horizontal cylinder pipe with a nozzle which has circular cross section with diameter, 80 mm, length, 800 mm and angle 55°. The XY plane was selected. Under units, the unit was changed from meter to millimeter. The outline of nozzle was sketched out with all the respective dimensions. To make the drawing 3D, the revolve function was selected where the sketched was revolved in 360°. After that, the nozzle with an angle of 110° had been formed.

Meshing
Once the geometry setup was completed, the next step will be meshing. The first step carried out in meshing was to select the mesh section. Under that section, a smaller element size was chosen to as it will provide a more accurate result in simulation and the mesh was generated. After that, the name selections were made for the inlet, outlet and wall of the nozzle.

Setup
In the setup process, double precision was selected in order to achieve a more accurate result. The nozzle will be tested with the necessary turbulence models which consisted of kepsilon standard, k-omega SST, laminar, Spalart-Allmaras and transition SST. Once the turbulence model has been selected in the viscous section under models, the material was chosen. In this case, the fluid selected was water in liquid form with its accurate density and viscosity. The fluid will flow from the inlet (blue arrow) towards the outlet (red arrow) as shown in Figure 7. The gravitational acceleration was set to be -9.81 ms^2 as the fluid is flowing downwards.

Boundary Conditions
The boundary conditions for the inlet, outlet and wall needs to be set. At the inlet, the inlet velocity for respective simulation model was chosen. As for the outlet boundary setting, the gauge pressure was also set accordingly. The following step will be setting the wall motion to be stationary wall, shear condition to be no slip and the roughness models to be standard. The inlet velocity, outlet velocity and wall boundary setting will be the same for every simulation model.

Solution
The final section will be the solution. Under this section, methods will be selected. All the parameters in the spatial discretization category will be changed to second order so that a more accurate result could be achieved. After that, the initialization step will take place where the hybrid initialization will be chosen because it is able to provide a higher efficiency when initializing the solution. Next, run calculation was selected and the number of iterations was set. The calculate button was pressed and the calculation commenced. The calculation will stop once the residual values reach less than 0.01. The convergence of the turbulence model will be observed and analysed.

Results
The final step is the results. Firstly, a streamline was added. 100 samples were added and are equally spaced from the inlet to increase the accuracy. Next, a vector plot was added so that the flow of the water can be seen clearly. The symbol chosen to display the water flow was 3D arrows for easy visualisation. After that, the contour function was added to the sketch. The locations selected was wall solid, variable was velocity, range was global and the # of contours was 100. For the final step, a chart was plotted for easy visualization and analysis. As for the chart, the type chosen was a XY-Line. The location was selected at Line 1, the X axis variable was velocity and the Y axis was Y. Hence, the velocity distribution chart has been plotted. The contour plot and chart can be viewed under the results and discussion section.

Results
The results are taken from simulations conducted SolidWorks, MATLAB and Ansys Fluent. In SolidWorks, the individual components of an agricultural drone were designed and sketched. They are then assembled to for visual idealization of how the agricultural drone would look like. As for MATLAB, all of the results obtained from the simulation conducted are tabulated. An analysis is made from the graphs plotted based on the velocity, acceleration, position and flight pathway taken by the agricultural drone to water a specific area. Furthermore, the simulation of fluid spraying out of a nozzle used by the agricultural drone is carried out in Ansys Fluent to further understand the spraying pattern.

Agricultural Drone Design and Simulation in SolidWorks
Each and every individual drone component were purely sketched and designed from scratch in SolidWorks. Recent developments of smaller sensors have made progress to the development of smaller UAVs such as a quadcopter [11]. A quadcopter consists of 4 extended arms which are attached to a frame that holds all the onboard electronics [12]. The frame of the quadcopter that was utilized in the design is the Tarot 650. All of dimensions were drawn accordingly to the exact length and size of the actual components. They are first drawn in 2D and then transformed into 3D objects. Carbon fibre was chosen as the material for most of the components because of its strength and weight. It has unmatched strength for its light weight, along with modern cosmetics. The first part being sketched out was the top main plate of the Tarot 650 as shown in Figure 9a. It is the flat part with many components soldered to it. It is equipped with a high tensile strength printed circuit board (PCB), which will enable a faster and safer connection. The next component designed was the bottom main plate of the quadcopter as shown in Figure 9b. It has the exact same dimensions as the top main plate but there is a slight difference in the design only. The main plate will be fixed with M2.5 stepped screws whereas the M3.2 stepped screws will be used to connect the arm and PCB plate firmly. After sketching both the top and bottom main plates, the next part of the quadcopter designed was the drone arm as shown in Figure 10a. The material selected was carbon fibre. The drone arm will be clamped into the arm pivot before clipping it using the arm clip. The following component sketched is the drone arm clip as shown in Figure 10b. The function of this component is to clip the drone arm and hold it in position. The arm clip will clip the drone arms and be placed in between of the two main plates. Reinforced nylon material was applied to create this component. Next, the drone arm's pivot was designed and sketched out as shown in Figure 10c. This is the pivot for the folding arm on the Tarot 650 frame. It goes on the inside end of the arm to fix it to the frame. The completed folding arm is shown in Figure 11 where the drone arm, arm clip and pivot are then combined to become the whole piece. The landing gear consists of the drone leg, leg pivot, landing gear connector, pure carbon tube and landing gear foot which could be seen in Figure 12a to Figure 13c. Firstly, the drone leg is connected to one end of the leg pivot. Next, the landing gear connector is attached to the other end of the drone leg. Then, the pure carbon tube will be connected to the landing gear connector. Lastly, the landing gear foot will be attached to both ends of the pure carbon tube where the landing skid is completed. The leg pivot was designed to hold the drone leg in position and fix it to the frame of the quadcopter. The landing gear connector is a 16mm T type mount for the landing skid. It will be used to connect pure carbon tubes and hold them in place. The surface of the pure carbon tube was processed with high-precision and specific diameters. It has good vibration resistance, is able to withstand high intensity and light weight. The landing gear foot was designed using high density rubber. This material was chosen because it is a very good shock absorber, reliable and stable as it is much better compared to a regular plastic landing gear. The combination of the drone leg and the landing gear together can be seen in Figure  14. The following item designed was the vibration damper as shown in Figure 15. The goal of vibration damping is to minimise the medium and high frequency vibrations while it still allows low frequency actual board movement to take place in concert with the airframe.  Figure 16a, the battery mount plate was designed using carbon fibre so that it is lightweight and has a unique appearance design. It is very flexible to fix the battery mount as it has multiple ports for the battery tie. The payload deck clip was designed to be connected to the battery mount plate and fasten onto the pure carbon tube as shown in Figure 16b. The motor mount was designed by using reinforced polycarbonate (PC) injection so that it has high tensile strength as shown in Figure 17a. The design includes a brushless ESC hole on the back for easy installation. Moreover, it is based on the clamping design where it is very easy to adjust the motor mount level. The motor used is a brushless direct current (DC) motor which is the iFLight Tachyon T4214 as shown in Figure 17b. It was chosen as it is more reliable, quieter and more efficient compared to a brushed motor. This motor has a reasonable solid structure, large airflow and exquisite design. It uses the N45SH magnet to ensure that the torque remains the same without demagnetisation at high temperatures. Moreover, the EZO bearing is used to ensure the motor runs smoothly. This brushless DC motor also has a reliable magnetic circuit optimization where power conversion is excellent. Based on Figure 17c, the propeller used was the 1312 X Class. The material chosen was carbon reinforced nylon. A 6S 5200 mAh LiPo battery was sketched out as shown in Figure 18. It is the component that will make all actions and reactions possible. The drone would have no power without the battery therefore unable to fly. Different sizes of drones have different battery requirements. The drone used in this project is considered a big drone, so it requires a larger battery with a huge capacity in order to power all the functions of the drone. All the individual components were fully assembled. The modifications made to suit agricultural needs were adding specifically designed nozzles and a water storage tank to frame of the quadcopter as shown in Figure 19. The water storage tank is made from magnesium-based alloy as this material is recognised to be the world's lightest and strongest metal. Hence, it has the capability to reduce weight of the quadcopter. Moreover, it also has the highest strength-to-weight ratio. As for the simulation of the water flowing out of the nozzle, it has been conducted in Ansys Fluent.

Calculation of Velocity, Acceleration and Position in MATLAB
The MATLAB code was designed specifically to measure the velocity, acceleration, position and flight pathway that the agricultural drone takes. All the parameters measured are plotted out for easy visualisation and analysis. The initial conditions were set; The rate of change of time = 0.1s, acceleration limit = 1ms^-2 and the turning radius of the drone = 2m. Next, the code will first prompt the user for the desired x and y starting point followed by the x and y ending point. The starting and ending points are set for the agricultural drone to fly in a specific pattern and the size of the location being sprayed can be envisioned. In this case, both the x and y start point were set to be 0. After that, both the x and y ending point were set to be 100. Once the required parameters are determined, all the specified graphs will be plotted, and number of turns required will be calculated. The specific pathway taken by the agricultural drone is displayed in Figure 20 where the green circle represents the starting point and the red circle is the ending point. The position of the agricultural drone can also be found out which can be seen in Figure 21a. The agricultural drone's position is changing with respect to time. The blue line represents the x position and the red line represents the y position. The x position plotted has a gradual increase as it only changes once the agricultural drone performs a turn and y position plotted is constantly changing as it is the position that the agricultural drone is at throughout the whole spraying process.  Figure 22, it can be seen that the vx is only affected half of that compared to vy. This is said because the speed of the agricultural drone in the x-axis will only be affected where it loses speed to make the turn and picks up speed after making the turn. As for vy, the speed is constantly changing as the speed and position of the agricultural drone is dependent on where the drone is at. The velocity slowly increases after taking off and decreases when it is making a turn. It will increase once again when moving in a straight. The acceleration of the agricultural drone in the x-axis (ax) is represented by the blue line and for the y-axis (ay) is the red line. The acceleration graph is plotted based on the rate of change of velocity. As shown in Figure 23, the acceleration of the agricultural drone is constantly changing due to the rate at which the drone changes its velocity.

Design and Verification of Nozzle Mechanism in Ansys Fluent
At the initial stage, DesignModeler was used to sketch and design the geometry of the nozzle that will be used for the agricultural drone. The complete drawing of the nozzle can be seen in in Figure 24a. The angle chosen for the nozzle was 110° as it is the optimal angle to achieve maximum coverage compared to other angles. The following step was to mesh the nozzle drawing from DesignModeler. The purpose of meshing the drawing is because the mesh influences the convergence, speed of the simulation and accuracy. It is recommended to use a smaller mesh size so in this case the element size chosen was 10mm. This is said because more accurate results can be achieved. By using this size, it is able to minimize the simulation time, computing resources and numerical errors. Next, the inflation mesh will take place where the wall boundary and number of layers will be selected. The purpose of inflation is to create layers of fine mesh on the area of interest to correctly capture the velocity gradients near no-slip walls. In this case, inflation option chosen was smooth transition and the maximum layers was 5. The more the number of maximum layers, a clearer view for the smoothness of the elements and edges can be observed. The maximum target skewness was chosen to be 0.90, which is lower than the general maximum of 0.95. The meshing carried out on the nozzle can be seen in Figure  24b. The following step will be setup and solution which would be carried out in Fluent Launcher. The mesh of the nozzle will first be checked for the validity the drawing. In this case, the volume checked had no negative values, so the drawing is valid. The turbulence model chosen to analyse the nozzle was k-epsilon standard. For the k-epsilon standard turbulence model, 2 variables will be solved which are the turbulent kinetic energy, k, and the rate of dissipation of kinetic energy, epsilon (ε). Wall functions are used by the kepsilon standard model to analytically account for the fluid velocity in the viscous sublayer near the wall. This flow is the simplest wall bounded turbulent shear flow with a selfsimilar solution. Flows that have self-similar solutions are specifically useful for accurate model testing. This is said because their solutions are independent of initial conditions. The material selected for the fluid to be flowing in the nozzle was water (liquid). After that, the boundary conditions for the inlet, outlet and walls are set. At the inlet, the velocity magnitude was fixed at 5ms^-1 and the initial gauge pressure was set at 200000 Pascal whereas the gauge pressure was set to be 0 Pascal at the outlet. The wall motion was set to stationary, shear condition to be no slip and roughness models to be standard. After all conditions had be set, the hybrid initialisation would take place and the calculation for 400 iterations will show if the solution has converged or not. When the solution has converged, it will tell you that your simulation has reached to unique solution and it is ready for postprocessing. The starting velocity of the fluid is 5m/s but it gradually increases its velocity with respect to time. The contour function is used to simulate and display the result. The number of contours chosen was 100 because it displays a higher resolution of the velocity. The final result obtained in which the highest velocity is achieved in the smaller section of the nozzle. It happened right after the fluid flow through from the bigger cylinder to the smaller one as the pressure increases. The highest velocity is only achieved after a short duration as it needs to stabilize and adapt to the new environment of the nozzle.  Figure 27, the velocity of the fluid in the inlet starts at 5m/s which is the value that was preset from the beginning. It gradually increases as it flows towards the smaller section where there is a sudden increase in velocity until it reached the highest velocity before decreasing a little before spraying out of the nozzle.

Conclusion
In conclusion, the frame of the agricultural drone was designed, sketched and assembled in SolidWorks. The quadcopter can operate properly whereby the propellers were able to rotate when simulated in the Motion Study section. This proves that all the connections made between the individual components have zero errors. A MATLAB programme has also been successfully created to measure the velocity, acceleration, position and flight pathway that the agricultural drone takes. All the results obtained from the calculations are plotted out in the graph format for easy visualisation and analysis. The velocity, acceleration, position and flight pathway graphs were plotted out based on the user input values. The calculated number of turns taking by the agricultural drone was 13 to complete watering the entire designated area. The simulation of the fluid flowing inside the nozzle before spraying it out is successfully simulated in Ansys Fluent. The velocity of the fluid is displayed in a 3D model and graph form. The peak of the velocity achieved inside the nozzle was 10.80 ms^-1. The velocity of the fluid started with 10ms^-1 at the inlet of the nozzle and the velocity that sprayed out at the outlet was found out to be 10.40 ms^-1. These values indicate that it is a good nozzle. The water sprayed out is in a conical shape where it is able to spray and cover a large amount of area. This nozzle was able to have a greater velocity of the water sprayed out from the outlet.