Navigation and Applicability of Hexa Rotor Drones in Greenhouse Environment

: The paper discusses use-cases and a broad description of application possibilities of drones in greenhouses. Unmanned autonomous aerial vehicles (UAV), i.e. drones, are being used increasingly often for the direct or indirect collection of data. GPS navigation cannot be applied in an indoor work environment. One of the alternatives is to measure the distance from a fixed set of sensors with known positions. The paper presents a dynamic model for a hexa-rotor drone. In order to ensure reliable navigation a new navigation algorithm is presented based on the two-dimensional navigation algorithm of the robot motion control. It demonstrates the development of a three-dimensional navigation algorithm for the hexa-rotor drone with the hypothesis that the elaborate three-dimensional model can navigate the drone in an indoor environment. To prove the hypothesis, the simulation is implemented in Scilab environment with information about the flight path deviation from the planned routes, which is also given in the work.


INTRODUCTION
Interconnected sensors, capable of data forwarding are a well-known and a widely-used method of large scale data harvesting.These widely deployed sensors are often related to the concept of IoT (Internet of Things).Numerous electronic devices around us (fridges, cctvcameras in and around our houses, thermometers and other, smart-home equipment) have inbuilt sensors and are often used as environmental sensing entities.However, their utilization is low as they are fixed sensors: they could be active only for small fractions of time.To grow the sensors' utilization one can make them move.But how?
The phenomena where the sensors are attached to the human body and move with it across the day (smartphones primarily) is called crowdsensing and it is largely used in Smart City-related applications lately [30].However, smartphones have a limited and changing variety of sensors from model to model, so they are often unsuitable for several kinds of sensing tasks [1].
The other possible way to grow the sensors' utilization by moving them to the places of interest is to fly them to the spot with drones.The application of drones opens new possibilities in data collection, specifically in two areas.On the one hand, this is an alternative for sensors and other specific apparatus to be mounted on a drone that will make control flights (patrolling) over the crops in order to record the conditions and store the data.On the other hand, a drone can also be used for taking flights over the crops in order to communicate with each IoT device individually and collect data from them.
In cases where GPS navigation is not possible, or when it is not advisable to rely on, only distance measurementbased navigation technique is suitable.This method is also preferable from the viewpoint of energy saving and the low cost of hardware elements to be deployed [19].With this technology distance measurements are done to the fixed static sensors to calculate the actual position of the drones in the space where they are operating.
There are surprisingly many drone-surveillance tasks where GPS could not be used.Below, we discuss these, agricultural-related use-cases to further motivate the development of a suitable indoor-navigation algorithm for hexa-rotor drones.

Application of Drones in Agriculture
Supervising the growth of the sown crops and detection of diseases and pests are integral parts of the crop's life cycle.Soil preparation for plant cultures includes melioration, fertilizing, i.e. adding natural or artificial nutrients, so as to assure greater fertility and larger yields.The additional nutritional treatment of plants continues into the vegetation period, and if necessary, is complemented with chemical substances for disease and pest control.The determination of the type and amount of chemical substances needed, as well as the timing of spraying is based on regular supervision of crop growth.Most commonly observed factors are air and soil temperature and moisture, weather forecast, extrapolation of data on geographical spreading of the diseases and pest movement, etc.There is an evident need for human labour (experts, qualified and unqualified labour) to handle these tasks, though the cost of labour is increasingly weighing down agricultural businesses.The correct response to these issues is the application of mechanization and automation, leading to a decrease of costs.The latest technology and technical achievements in agriculture, and also in information-communication technologies offer further cost-cutting models, and eventually reduced expenses for agricultural business subjects.Crop growth control and disease and pest detection can be achieved (as mentioned above) with the help of IoT sensors that are interconnected and attached to the Internet.
The situation in green houses is similar to the general situation of farming, though, with some specific characteristics regarding the application of agricultural and information-communication methods and technologies.For the surveillance and tracing crop development in a closed space using a drone, the navigation is only possible based on communication between the drone and the mounted static sensors.As far as the application in greenhouses is concerned, one may also use light drones that cause less air turbulence.This, however, also limits the drone's payload weight during flight, as well as its flight range, and also directly influencing the possible flight time.
It is possible to carry out measurements using drones for the parameters of the following areas [14]: • Soil (measuring soil moisture and temperature, drainage evaluation, detection and tracking weeds, estimation and determination of area to be sprayed with herbicides, as well as the chemical's composition and concentration, detection of pests in soil, estimation and determination of area for type, composition and concentration of pesticides to be used) • Plants (detection of plant phenology, tracking of plant growth in its life cycle, evaluation of the sowing, i.e. germination, possible replanting requirements, fruit status, phases of fruit growing, fruit counting, yield estimation, detecting lack of nutrients (fertilizer) and microelements based on leaf discoloration, estimation of condition and determination of area where fertilizers are to be implemented, the precise type, composition and concentration according to the given needs, detection and tracking of plant diseases, estimation of condition and determination of area where pesticides are to be sprayed, precise type, composition and concentration of pesticides according to the needs, detection and tracking of pests based on leaf discoloration and damage to leaves -estimation of condition and determination of area where insecticides are to be sprayed, the precise type, composition and concentration of insecticides) • Air (measuring temperature, pressure and air moisture, pollen, spores, dust concentration as well as methane and CO 2 concentration) The benefits of drone implementation can be classified into the following groups: • Speed of executing measurements/time required for measuring and data collection, • Time required for data preparation for processing, • Precision of measured data, • Objectivity of measured data, • Cost of measuring/data collection, and data preparation for processing [18] • Increase of yield by up to 15%, [15] • Decrease of costs for fertilizer, nutrients, pesticide, insecticides by up to 40% [16] • Decrease of environmental pollution.
In this work, the modelling and simulation of a hexarotor drone in a virtual indoor scenario are presented.Applying drones in crop development control and protection in greenhouses is almost exclusively possible using navigation on the basis of communication of the drones and static sensors, whose coordinates are fixed and known.Therefore, one can implement algorithms for the three-dimensional determination of the drone's position and orientation.This work aims to show a modern way of collecting data from intelligent sensors using drones.Such a solution may serve as an alternative to the classical approach, i.e., the collection of data from networked intelligent sensors.The future research directions will focus on the investigation of use cases when the proposed alternative works better.

Navigation of robots relies on highly precise localization. The most well-known localization techniques
rely on the measured distances of the robot from known, fixed points [24].The most commonly used distancemeasurement techniques are: 1) Angle of Arrival (AOA), 2) Time of Arrival (TOA), 3) Time Difference of Arrival (TDOA) and 4) Received Signal Strength Indicator (RSSI).
The AOA method requires each mobile robot to have a series of antennas, and the angle of arrival of the transferred signal from static nodes/sensors is measured for each antenna.Distance is calculated accordingly.It is rarely used, because it requires a complex antenna configuration, fixed on the mobile robot itself.The TOA method measures the time of arrival of the signal between the nodes and the mobile robot.This enables the physical distance to be calculated.The TDOA method measures the time difference upon the arrival of the transferred signal from the individual nodes for distance estimation.This technique offers a great level of accuracy.RSSI method calculates the distance from nodes on the basis of the strength of the received signal.This technique is popular and advantageous because it does not require any additional equipment (apparatus, assemblies).
The three globally used localization methods at robot navigation are triangulation, trilateration and multilateration.Triangulation is the technique for the localization of robots in the plane.This geometrical algorithm operates precisely and consistently only if the stationary nodes are adequately positioned and the mobile robot is within the triangle, made up of three active nodes [9].Trilateration technique can be applied to localize mobile robots not just in the plane (in two dimensions), but also in space (three dimensions).To localize a mobile robot in 2D, it is necessary to use estimated distances from the robot to at least three fixed nodes.For 3D localization, it is necessary to know the distances to at least four stationary nodes [25].Multilateration is similar to trilateration with a greater number of stationary nodes: for the case of robots, it generally uses six to fifteen nodes [26].
The least average localization error can be achieved by multilateration.The best tradeoff between calculation time and punctuality for this method is when the number of stationary nodes is eight [27].
In the late years, a novel localization technique appeared, employed among others at light-weight Flapping Wing Micro Air Vehicles (FWMAVs).It uses gyroscope, accelerometer and magnetometer for state estimation and altitude control, and barometer for height estimation.These robot types' localization is harder, the major challenge lies in the disturbance of the accelerometer measurements by the flapping motion of the wings.Novel methods had to be found to overcome this.To lower the localization inaccuracies, mechanical damping and flapcycle-based filtering were introduced [28].
At the beginning of this year, a new theory has been published that allows drones to see and measure distances with a single camera.Researchers at TU Delft [29] have found that drones -with an insect-inspired vision strategy -when approaching an object become unstable at a specific distance.Turning the weakness into strength, drones can use the timely detection of the discovered instability to estimate distance from the ground or the target object.
Researchers of the Micro Air Vehicle Laboratory were getting inspiration from flying insects to make even smaller drones able to navigate by themselves.
Some of today's consumer-drones use similar inspiration to estimate their velocity.They have a downward-looking camera which determines the speed, with which the objects are moving through their field of view.This optical flow provides only the ratio between distance and velocity (h/v) but not their values separately.So, the drones designed for indoor use, usually have an additional sonar, which determines the distance to the ground, so the velocity can be calculated accordingly.With the novel technology of Micro Air Vehicle Laboratory, the implementation of the sonar can be left out, so making even smaller drones is becoming possible.

DYNAMIC MODELLING OF HEXA-ROTOR DRONE
A dynamic model of drones and the rotational forces of the propellers are presented in Fig. 1.The structure must be quite thin and light, however the body must be rigid.The six rotors are symmetrically installed around the centre of the drone and the sets of two opposite propellers rotate in the same direction as shown in Fig. 2. The propellers' rotation axes are fixed and parallel to each other [11].These considerations ensure that the only variables for the propellers are velocity and speed.The drone configuration has six rotors which generate the propeller forces F p (p = 1, 2, 3, 4, 5, 6) as shown in Fig. 2. The control of the drone is achieved by commanding different speeds to different propellers, which, in turn, produces differential aerodynamic forces and moments.In order to increase the altitude of the aircraft, it is necessary to increase the rotor speeds all together by the same amount [4,6,13].Each rotor consists of a brushless DC motor and a fixed-pitch propeller.This drone consists of three rotors which rotate clockwise 1, 3, 5 and three that rotate counterclockwise 2, 4, 6.Forward motion is accomplished by increasing the speed of the rotors 3, 4, 5, while simultaneously reducing the same value for forward rotors 1, 2, 6.For leftward motion the speed of rotors 5 and 6 is increased, while the speed of rotors 2 and 3 is reduced.Backward and rightward motion can be accomplished in a similar fashion.Finally, yaw motion can be performed by accelerating or decelerating the clockwise rotors, depending on the desired angle direction [4,6,13].
In order to describe the motion of a six-degrees-offreedom rigid body, it is usual to define two reference frames: • the earth inertial frame (E f ), and • the body-fixed frame (B f ).
The E-frame (O E xyz) is chosen as the inertial right hand reference.This frame is used to define the linear position and the angular position of the drone, given in meters and radians, respectively.The B-frame is attached to the body.The origin of the B-frame is chosen to coincide with the center of the drone cross structure.This is also a right-hand reference.
The linear position of the drone (X, Y, Z) is determined by the coordinates of the vector between the origin of the B frame and the origin of the E-frame, according to the Eq. ( 1).The angular position of the drone (Φ, θ, ψ) is defined by the orientation of the E B -frame with respect to the E Eframe.This is defined by three consecutive rotations around the main axes, which take the E E -frame into the E Bframe.In this paper, the "roll-pitch-yaw" set of Euler angles (Φ, θ, ψ) were used [23].
The vector that describes the drone's position and orientation with respect to the E-frame can be written in the following form: , , , , , The rotation matrix between the E E -and E B -frames takes the following from: In order to implement a suitable attitude controller for the drone prototype, an accurate dynamic model needs to be developed [21].This model is based on certain assumptions, in order to simplify the dynamics of that complex system, so as to be suitable for simulation.The model of drone dynamics can be described by the following system of equations [23]:       where c Φ = cos(Φ), s = sin(Φ), x, y, z are the coordinates of the drone, ψ is the yaw angle of the drone, θ is the pitch angle of the drone, and Φ is the roll angle of the drone.F denotes the total force applied to the vehicle, m is the total mass, g denotes the gravitational constant and l represents the length of the arm holding the propeller.J is the drones's diagonal inertia matrix and K is aerodynamic force constant.The Eqs. ( 3)-( 5) describe the linear acceleration of the vehicle in the direction of the x,y and z axes respectively, while the Eqs.( 6)-( 8) are nominated for the angular accelerations of the drone.

3D NAVIGATION ALGORITHM
This work introduces a new technique for finding indoor 3D location of a drone by using Received Signal Strength Indication (RSSI) [21,22,24].The proposed localization algorithm is derived from multilateration algorithm with composition of empirical path loss model.Fig. 3 presents the developed 3D localization algorithm used by drone indoor navigation [17].The estimation of X e , Y e , Z e is processed using the algorithm, as depicted in Fig. 3. Values X i, Y i denote the node position of the current grid with the maximum averaged RSSI parameter.Thus, the navigational space can be divided into a grid where the nodes represent the border points, which communicate with each other wirelessly, and therefore, the nodes can be used to define which grid that is [2,8,12].

Figure 3 The navigation algorithm
The computation of average RSSI is active while m > 0 and n > 0. From the maximum averaged RSSI value of the current grid, the 2D location estimation can be done.The calculation of the estimated distance from the received power indicator can be performed using the standard path loss model.The estimation of the Z e is done by the calculation of the mean value of all n node positions from the current grid [9].
While the drone is following the defined path in the defined area, a WSN node periodically receives packets from the target node.The WSN node computes the RSSI values and has its position details received from the drone with respect to its 3D movement.The authors used a Zigbee 802.15.4 device with a frequency of 2.4 GHz for wireless communication and to obtain RSSI values.After obtaining the RSSI values and the respective position details from the drone, the device will send a packet consisting of RSSI values and the respective position details through wireless communication to the base node, which is connected to the Server.After receiving the results of the RSSI values with respective position details, the authors used Scilab to analyse the data and apply them to the developed algorithm [9,31].
The UAV system performance was assessed in Scilab simulation using the drone model, and the actual control algorithms.The system hover and manoeuvring capabilities were tested using a latitude step setpoint.The drone yaw and altitude were assumed constant, being controlled by the drone's internal controller.The position, estimated using template matching, was compared with the drone model position output.The authors took a moving drone with a node and a fixed node set, as shown in Fig. 6.

IMPLEMENTATION AND TEST ENVIRONMENT
For the implementation and test environment, a PID controller was selected to provide attitude control for the drone.
where K p is proportional gain, K i is integral gain, K d is derivative gain, and e(t) is defined as the difference between the actual controlled variable value and a desired value.A Scilab/xcos model was built using Scilab 5.5.2 in order to simulate the system's dynamics and response under various conditions, as shown in Fig. 4. The implemented PID controller was tested for a step input to the desired altitude, the output is presented in Fig. 5.The plant transfer function is the drone's propeller driven by a DC motor model, where the inertial parameter J = 10 and the friction coefficient is B = 1.The analysis of the PID feedback control is often performed under the assumption that the system is purely linear.In real devices, nonlinear elements emerge at certain points in the feedback loop [3,7,11].The system response is considerably fast and has an acceptable overshoot, in addition to a small steady state error.
The node is programmed to give the drone instructions to move via WSN to follow a curved path in a defined area [20].The obstacle avoidance is solved with the use of range-finder sensors, in order to detect avoidable obstacles within the drone's path.The reflected signals from the range-finder discover the position and distance.Six rangefinders are implemented within the system, all aligned within half angles of each other to retrieve a clear position of an obstacle.While the drone is moving in the defined area, WSN node gets packets periodically from target node as shown in Fig. 6.After getting results of RSSI values with respective position, Scilab is used to analyse data and to apply the developed navigation algorithm.The average localization error within the controlled microclimatic environment using the presented algorithm is 0.71 m.Based on the obtained measurement results, the authors have concluded that the optimal method for the localization of the drone within WSN is with eight observable fixed nodes.The experimental results show that the developed algorithm produces quite acceptable error rate of 3D location of target node (<1 meter) in indoor environment.The author's plan is to develop a dynamic algorithm to get still more accurate 3D location of a desired sensor node.

CONCLUSION
This paper presents a dynamic model of a hexa-rotor drone, as well as a three-dimensional model of a navigation algorithm for controlling the movement of drones, given that inside the greenhouses they cannot rely on GPS navigation.The quality of the dynamic model and algorithms for navigation was tested in simulation, which was implemented in Scilab environment.The PID controller used here is sufficient and suitable for controlling the behaviour of the hexa-rotor drone.The quality of the models and algorithms for navigation is given by an error-offset value of the controlled variable from the planned value.Apart from the implementation of the navigation algorithm, the performed tests indicated a presence of a research area where methodological and algorithmic improvements are possible in the field of indoor localization with drones using WSNs RSSI parameter without any additional hardware.Experimentation results show that proposed algorithm can estimate target node location with 0.71 meter average estimation error.

Figure 1
Figure 1 Block diagram of the dynamic model

Figure 4
Figure 4 Implemented PID controller block diagram

Figure 5
Figure 5 Implemented PID controller output

Figure 6
Figure 6 Simulation environment

Figure 7
Figure 7 Localization error

Fig. 7
Fig.7shows the measured localization error within the test environment using the applied navigation algorithm.The average localization error within the controlled microclimatic environment using the presented algorithm is 0.71 m.Based on the obtained measurement results, the authors have concluded that the optimal method for the localization of the drone within WSN is with eight observable fixed nodes.The experimental results show that the developed algorithm produces quite acceptable error rate of 3D location of target node (<1 meter) in indoor environment.The author's plan is to develop a dynamic algorithm to get still more accurate 3D location of a desired sensor node.