UAV Delivery Monitoring System

. UAV-based delivery systems are increasingly being used in the logistics field, particularly to achieve faster last-mile delivery. This study develops a UAV delivery system that manages delivery order assignments, autonomous flight operation, real time control for UAV flights, and delivery status tracking. To manage the delivery item assignments, we apply the concurrent scheduler approach with a genetic algorithm. The present paper describes real time flight data based on a micro air vehicle communication protocol (MAVLink). It also presents the detailed hardware components used for the field tests. Finally, we provide UAV component analysis to choose the suitable components for delivery in terms of battery capacity, flight time, payload weight and motor thrust ratio.


Introduction
The use of UAVs in urban areas is increasingly being considered to overcome ground delivery traffic issues.However, flight environments are subject to dynamic changes due to shifts in weather patterns and moving objects.To improve UAV flight safety, proposals have been offered to effectively monitor the entire UAV delivery process.This paper provides requirements that should be considered when building an effective ground control station (GCS).There are two main GCS typesready-made open source GCS and customized GCS.
Ready-made GCS is typically open source software that can easily be downloaded from the internet and used for mission management and real-time flight operation.Lim et al. [1] analyzed eight open-source projects (OSPs) for UAVs.They discussed five autopilot componentsprocessors, gyroscopes, accelerometers, magnetometers, and barometersand introduced flight controllers with various functions to monitor and control UAVs.Moreover, additional functions can be added by extending the open source code.Mission Planner and Qgroundcontrol are representative open source software packages that deliver UAV flight automation.It enables UAVs to fly along predetermined waypoints and provides real time flight data.It also provides an automatic return function that engages when fuel or battery levels are low [2].Ready-made GCS are convenient due to their wide functionality range.However, some functions of logistics purpose for delivery tracking in real time and history report of the previous flight missions are not provided.And, they are overly focused on flight functions, making it too difficult for normal users to apply for nontraditional tasks.
Customized GCS can be implemented according to project requirements.For example, Perez et al. [3] described the development of an efficient and comprehensive guidance system to monitor multiple UAVs in real time, while also discussing the main layout for a multi-UAV GCS.Generally, open source libraries are used to develop customized GCS.Dong et al. [4] developed a real-time software system for an unmanned helicopter with a two-layer framework, i.e. the data was transferred in the background while the visualization operated in the foreground.
The proposed monitoring system is a customized GCS inspired by FlightRadar24 (Live Air Traffic) [5].FlightRadar24 facilitates the real time tracking of commercial flights by providing geographical locations and flight data such as flight numbers, speeds and headings.The monitoring system provides not only flight data but also delivery item management to improve logistics efficiency.
In this research, Pixhawk autopilot UAV is used with selected flight components to perform deliveries.MAVLink protocol [6-8] is used to receive the flight data and command of the UAV.Our main objectives for the monitoring system are (1) managing order assignment for a flight mission (item assignment and path planning), (2) controlling autonomous flight, (3) monitoring in real time, (4) tracking the UAV and delivery items, and finally, (5) dropping the parcel at a specific location autonomously (gripper servo movement).

System structure
Fig. 1 depicts the required functions of the monitoring system for UAV delivery.The system is designed to combine useful UAV delivery system functions that are not normally supported by ready-made GCS.(1) The system combines order assignment and path planning functions together to deliver items with minimal flight times.We use a concurrent scheduler approach together with a genetic algorithm (GA) to assign items to flight missions [9][10].Accordingly, there are six parametersitem weight, order weight (for a collection of items), the UAV's sustainable payload, UAV flight time, delivery distance and UAV speed.All of the parameters must satisfy one another to achieve real flight.Therefore, GA with the concurrent scheduler approach is used to solve multi-parameters.Finally, the approach results in sets of missions with items, destinations, and selected UAV.
(2) The autonomous flight is controlled via MAVLink.The commands with detailed parameters for the required maneuvers are shown in Table 2.
(3) For real time monitoring and UAV flight safety, our monitoring system uses MAVLink messages to receive autopilot flight data, which are shown in Table 1.(5) Finally, the specific destinations (latitude and longitude) are defined as waypoints to drop parcel.The system tracks UAV location during flight.UAV receives a command (MAV_CMD_DO_SET_SERVO [11][12]) to open the gripper servo when it reaches the proper altitude of the designated destination (MAVLink command, Table 2, No 6).The whole UAV delivery procedures can be seen in Fig. 3.The next steps of the delivery system are to implement emergency flight control with the help of the environment data and UAV components failure monitoring.

Communication structure
In the system, 3DR telemetry (TX/RX) is used to communicate between the Pixhawk autopilot UAV and monitoring system.Pixhawk supports PX4 firmware and Ardupilotmega firmware.We use Ardupilotmega for our system.Specific system IDs are assigned to each autopilot and they are assumed as the UAV ID in MAVLink.The telemetry conveys MAVLink messages and data which contain the aircraft flight data and UAV GPS information with the respective system ID of the XML data file.At the same time, the monitoring system sends commands to the UAV to engage in functions such as take-offs, landings, and auxiliary servo movements.The commands are also sent to UAV via the command XML file.XML files are generated from the MAVLink C header library, which is decoded or encoded using Node.JS MAVLink of the JavaScript package manager [13].We use two telemetries -TX and RX.One of the telemetries (Serial COM6) is used to send while the other (Serial COM5) continues to receive telemetry messages, as shown in Fig. 4.

MAVLink communication protocol commands and messages
Tables 1 and 2 describe the MAVLink messages and commands used to implement the monitoring system.Table 3 describes the report status messages (failed or executed) that appear after the commands are sent.4)

Hardware analyses (flight time, weight and thrust force for motors)
For delivery purposes, the weight and flight time are correlated.Extra weight causes shorter flight times.Normally, flight time would be directly related to battery capacity.However, larger battery capacities may also result in heavier total payloads.Therefore, choosing an appropriate battery capacity often becomes a consideration.Normally, commercial UAVs can fly from 15 to 30 minutes.However, depending on customized components with advanced technologies and algorithms, some UAVs can fly for up to an hour.

Flight time estimation
Flight time estimation is not only effected by (i) the battery capacity but also (ii) the power consumption (current drawn) of the electronic components embedded in the UAV autopilot board.Moreover, for delivery purposes [17], (iii) the total all-up-weight (AUW), which includes the weight of products being delivered [17], and (iv) the thrust of the motor related to propeller size [18] are also considerable.A simple and an easy method of estimating flight time related to battery capacity and current draw is described in Eq.1.
Flight time (minutes) = (Battery capacity/ Current draw) *60 (1) For example, if the battery capacity is 5600mAh (LiPoly 60C) and the motor amp has a current draw of 25, Eq. 1 produces a flight time estimation of 13.44 minutes.However, the flight time is around 11 minutes with around 900 grams of UAV weight together with 500 grams of carry payload in the real experiment [17].Choosing the propeller size in order to lift the entire UAV mass is described in the load calculation equations and its related calculations [18].

Thrust motors to carry a specific payload weight (Thrust to weight ratio)
As flight time varies according to payload, the thrust required to move forward related to the total mass of the UAV should be calculated.Eq. 2 represents a commonly used, easy equation to calculate motor thrust.The final total AUW is the total weight of the UAV, including components, i.e. the airframe, autopilot, sensors, battery, motors, ESC, propeller, camera, and delivery package [18][19][20].

Required thrust per motor = [AUW x 2 (or) 3] / number of motors
(2) 2:1 thrust ratio is standard where AUW is ratio value of 2 for one/each motor thrust.For particularly acrobatic cases that use a 3:1 ratio to improve efficiency.If a copter is able to handle approximately 1 kilogram, according to the 2:1 equation ratio, a total thrust of 2 kilograms and 500 grams of thrust per motor are required.In the present study, the thrust to weight ratio is set as 2:1; this is a good starting point as it ensures that enough thrust exists for the desired performance, and it avoids overly agile UAV movements.

Choosing the correct Lipo battery capacity
The electrical power for a multi-rotor can be approximated using Eq. 3 [21-23].The equation is related to the power estimation theory of a Lipo electric battery (discharge rate).
The electrical power (watts) used by a multi-rotor to hover is P, calculated by obtaining V and I from the onboard power module.The motor speed and weight can vary according to the current draw under various conditions such as the UAV heading with air resistance.In addition, the battery discharge rate is higher in hot and warm weather than in cold conditions.Therefore, the maximum electrical power or maximum sustained discharge rate must be defined.In the example with 25 ˚C with 3700 mAh Lipo, the maximum sustained discharge rate is 92.5 A, which can be calculated as I = 25*3700/1000 = 92.5 A. For the quad-copter with four motors, the current draw for each motor is 21 A with a maximum (21x4) of 84 A. The amount of electricity needed for flight operation is 92.5 A (92.5 > 84).
Accordingly, the maximum sustained discharge rate of 92.5 A with 3700 mAh is suitable for flight operation.

UAV Delivery Flight Experiment
The gripper for the parcel is attached under the UAV frame, as shown in Fig. 6 (left).Two servo motors are used to operate the gripper, Fig. 6 (right-up).The parcel box requires a stick with a head blob for the gripper to grab onto, Fig. 6 (right-down).Table 5 shows our UAV's component specifications for the parcel delivery.meters and changed into auto mode to follow the waypoints.It then descends to 1 meter when it reaches Waypoint 3. The monitoring system subsequently detects the UAV at a specific location (latitude, longitude and altitude).It sends a servo command to open the gripper to drop the parcel.UAV flight mode then changes to returnto-launch (RTL).This returns the UAV to its home position.The entire mission lasted a little over 2.5 minutes with a distance of 129.5 meters from home to the destination.The delivery process was achieved autonomously from take-off to landing.

Conclusions
UAVs are capable of safely delivering goods via UAV monitoring functions.These functions monitor the working conditions of essential UAV components in real time, including batteries, speeds, headings, and flight data.
In addition, this approach also provides tracking delivery statuses such as upcoming waypoints, current items, and descriptions.Moreover, the system can send immediate manoeuvring commands to a UAV to avoid obstacles and engage a forced landing.In the present study, our system is implemented to fulfil a fully autonomous UAV delivery to overcome last-mile logistics challenges.

Figure 1 .
Figure 1.UAV delivery monitoring system functions

( 4 )
UAV and item tracking are shown in Fig. 2. Three main panels -UAV details, mission details, and real time dataare included.The UAV details panel shows detailed data regarding UAV flight time and sustainable payload weight.The mission details panel shows the current mission and ordered items information, as well as the home, destination, and waypoints.The real time data panel shows the real time data for the flights data, positions data, battery data, and telecommunication data.

Figure 4 .
Figure 4. Communication for UAV delivery monitoring system satellites visible (0-20)small visibility numbers indicate that communication between the UAV and GCS is weak ) fix_type (status of GPS -No GPS, 3D GPS and 2D GPS) sequence/waypoint to which the UAV is currently heading.We define sequence as a waypoint before actual flight) 4 -Battery monitoring data -UAV flight safety SYS_STATUS [14] battery_voltage (currently used battery voltage in real time of flight) battery_current (drawn current in real time of flight) battery_remaining (remaining percentage in real time of flight) 5 -Flight data -UAV flight safety ATTITUDE [14] pitch (pitch movement in real time of flight) yaw (yaw movement in real time of flight) roll (roll movement in real time of flight) 6 -Speed data -UAV flight safety GPS_RAW_INT[14] vel (Ground speed -provided by GPS embedded on autopilot) 7 -Heading data -UAV flight safety GLOBAL_POSITION_I NT [18] GPS_RAW_INT[14] hdg (UAV heading yaw angle in degree) cog (Course over grounddirection of UAV movement between two waypoints with respect to the surface of the Earth) 8 of base_mode and custom mode can change the flight mode details in Table

Figure 6 .
Figure 6.Quad-copter with the parcel (left), the gripper with two servos (middle), and the parcel (right)

Table 3 .
Acknowledgement message

Table 4 .
Flight Mode

Table 5 .
UAV component specifications g = gram, kg = kilogramA flight test is performed to accomplish the continuous three waypoints, as shown in Fig.2.The UAV starts from the home location with an altitude of 30