Modelling of time-to collision for unmanned aerial vehicle using particles swarm optimization

ABSTRACT


INTRODUCTION
TTC parameters has often been used as a risk assessment metric for traffic safety analyses [1], identify traffic safety impacts, such as in [2], driving simulators [3], improve vehicle safety to provide a more accurate result that could be used in a collision avoidance system [4] and determining the time before rear-end collision [5]. TTC was introduced by [6]. Some research has been carried out on TTC with different terms, such as Gap Time (GT), Encroachment Time (ET), Deceleration Rate (DR), Proportion of Stopping Distance (PSD) Ratio, Post-Encroachment Time (PET) and Initially Attempted Post-Encroachment Time (IAPT). GT is similar to TTC [7].
According to Hayward and Federal Highway Administration, U.S. Department of Transportation (FHWA), for example, TTC can be defined as the time required for two vehicles to collide if they continue at their present speed and on the same path. In 2008, FHWA combined traffic simulation and automated traffic conflict analysis to develop a software utility referred to as a surrogate safety assessment model (SSAM). In freeway simulation models, TTC is often a critical element of a driver's trajectory management decision-making process and has been used as a cue for decision-making in traffic conflicts research and for activating a driver support system such as CAS [8]. In addition, TTC has proven to be an effective measure for rating the severity of traffic conflicts and for discriminating critical from normal behavior. In principle, the lower the TTC, the higher the risk of a collision.
Any system with have predefined information about TTC is an advantage in order to improve the decision-making process and offer good perspectives in the understanding the navigation control algorithm to avoid a collision. This information helps to reduce dependency on physical information like distance and speed. For example in [9], proposed a collision warning algorithm based on the TTC estimation for traffic safety in the scenario of an arterial road with on-ramp under a connected environment. The GPS based information of vehicles is assumed to be collected by the roadside device such as position, travelling direction and velocity. Then, the TTC of a pair of vehicles in arterial road and on-ramp is estimated based on their position, travelling direction and velocity difference. Beside that, visual control of vehicle braking based on TTC information was introduced by [10]. However, the implementation is limited only for the ground vehicles scenario.
From the previous works mentioned above, the TTC algorithm is an inessential method in traffic modelling software and collision avoidance system for ground verhicles. However, the use of TTC vehicle algorithm model as a risk assessment matrix for CAS in an aerial vehicle, especially for an unmanned aerial vehicle is relatively still under-explored. The TTC model provides important parameters that can be utilized as a risk assessment matrix for CAS analyses in the UAV system as has been applied on the ground vehicle. Therefore, in this work, we proposed a method to develop a mathematical model of TTC for the UAV system and using PSO for modelling optimization purpose, where the objective is to minimize the difference between the model and the actual system.
PSO-Based optimization is widely encountered in various fields of science and technology, such as to minimize the water deficit of a reservoir system [11], to find the optimal deployment of the wireless sensor network coverage device to get better quality of service of the Wireless Services Network (WSN) [12], mobile robot obstacle avoidance algorithm [13] and multiple-UAV positioning algorithm that can maximize the proposed total utility at each position update [14]. Particles Swarm Optimization (PSO) optimization technique is developed by [15]. It is inspired by the social behavior of bird flocking or fish schooling. PSO has been successfully applied in many research and application areas. For instance, PSO was applied to find the optimal arrangement of the sensors that give the best coverage in WSN, and solving optimization problems of electric power systems [16].
Therefore, this paper, a new methodology for an estimate and modelling the TTC for UAV without applying braking control in the real world environment is presented. The real data are collected and filtered from the real system in the uncontrolled environment. This is a challenging procedure to comply because of environmental factors. The naturally wind speed vectors, flying altitude, experimental site temperature and humidity are monitored and recorded continuously. A quadcopter has been designed and developed as our UAV testbed system plant.
This paper is organized as follows: The second section presents the TTC model for UAV system which includes their design of experiments, the definition of TTC parameter and specification of our testbed system. The third section presents the experiment data collection and optimization of TTC parameter using PSO algorithm. The fourth section is devoted to the results and discussion of TTC model. Finally, in section 5 the paper is concluded and future path of our work is discussed.

TIME TO COLLISION MODEL IN UAV SYSTEM
In this section, a new methodology to develop a model of TTC for UAV is presented. It consists of two major steps, firstly is platform development and secondly is flight mission data collection.

UAV testbed development
This works used OPS's quadcopter as our research platform as published in [17]. This platform system based on Open-Source Project (OPS) [18] with PID controller. The quadcopter equipped with an external GPS on-board sensor, PIXHAWK flight controller, RC transmitter, a receiver and Mission Planner software as a Ground Control Station (GCS) with low-latency 2.4GHz radio-based telemetry system for communications. The total body weight (battery included) is 2534g.  Figure 1. illustrate the TTC definition parameters for quadcopter platform in the real environment condition. All parameters required can be extracted from on-board external storage of flight controller. At the same time, ground control software are used to monitor the flight mission along the experiment performed, and wind speed meter continuously recorded the wind speed, temperature and humidity. Vb is defined as the current quadcopter horizontal speed when the throttle stop signal is received from the ground control. Vf, is stop speed of quadcopter. We define 0 to 0.02 m/s is as stop speed range value. viw, is an average speed of wind along the flight mission, wio , is quadcopter payload in gram, and tlb, is the times are required to quadcopter stop without any applying braking control system to them. For safety and longest flight time reasons during experiment, light payloads ranges from 0 gram to 200 grams are selected. Other than that, maximum speed of our platform is limited to 5 m/s. All data collection from our experiments considered the telecommunication latency, vehicle altitude and direction and also wind flow velocity on the experiment location. The design of experiments to measurement of TTC parameters is not easily straight forward as ground vehicle, especially in the uncontrolled environment. UAVs are operated without a human pilot on board, otherwise, the vehicle remotely controlled by a pilot from a ground control station. Signal data is always transmitted wirelessly for controlling the vehicle and real-time data monitoring, therefore data transmission latency is involved [19]. Besides that, consideration of the UAV's capability to operate with high agility and rapid maneuverings. Despite this rapid maneuverings ability, the altitude and the direction of UAV need to control throughout the experiments. The same horizontal altitude flight path and also their direction has been specified for all experiments. Finally, the wind velocity vector has a significant nonlinear effect on the navigation, inertial orientation and rates of the vehicle. Wind speed data will be measured throughout the experiment.

Flight mission data collection
Real data for each UAV flight mission is collected in order to measure their time to collision. Data for each flight setting needs to be analyzed first to get required parameters. PSO algorithm is used to optimize these model. The communication latency factor is not presented in our TTC modelling development. The average wind speed during the flight mission has been recorded separately using wind speedometer at the position on 5 meters' height.
During the experiments with weather condition like air temperature, relative humidity and wind speed are taken using hand-held digital anemometer. This meter is portable and have USB real time data uploading functions to allow measurement data to be continuously recorded in the computer.
Normally, each flight mission required around 15-20 minutes and this will provide 30 accepted data sets averagely. That means, 6 to 7 times of flight mission are required in order to generate 200 rows of TTC data set, for each payload. We divided payload into 5 scales, 0, 50,100,150 and 200 grams. After each session of experiment, the battery needs to recharge to ensure the battery levels will not affect our data consistency. Data row list of flight mission were downloaded from external on-board controller storage consist of huge information. Each row has their own timestamp in microseconds.
In order to extract the required data, a TTC extracted algorithm is developed. That algorithm objective is to select horizontal speed (first parameter), which requires information of altitude, time stamp and Global Positioning (GPS) speed. The second parameter is to define the starting time to calculate parameter. After that this parameter will be called as . These parameters extracted by comparing the magnitude of RCIN signal received from the ground control station. RCIN started counted when the magnitude of RCIN drastically change over than 100 units. The RCIN signal (in blue colour) changing is shown in Figure 2. The next step of TTC extracted algorithm is to determine the stop point. This is done by continuously finding the lowest GPS speed after the starting point. The speed is below than 0.02 m/s is considered as stopping point. Finally, the can be easily calculate by subtracting starting

MODELLING OF TTC USING PARTICLE SWARM OPTIMIZATION 3.1. Particle swarm optimization
Particle swarm optimization is a population-based optimization tool inspired by the natural social behaviour of certain organisms like bird flocking and fish schooling. This behaviour is imitated in PSO where particles (agents) fly over the search domain influenced by their experience and the experience of the surrounding neighbours.
The algorithmic flow in PSO starts with a population of particles whose positions, that represent the potential solutions for the studied problem, and velocities, that determine the next move, are randomly initialized in the search space. All particles compose a swarm. The search for optimal position (solution) is performed by updating particle velocities vector ( ) and positions vector ( ) by rules are respectively given as follows: Where is the velocity of particle at iteration , is inertia weight used to control the effect of the previous velocity in the current velocity, 1 and 2 are the learning factors to control the effect of the "best" factors of particles; and , 1 and 2 are two independent random numbers in the range of [0.0,1.0]. The velocity of the particle is influenced directly by two factors; the best position found so far by the particle ( ) and the best position found by the neighbouring particles ( ,). The particle's new velocity is then used to update the particle's position using (2), where is the position of particle at iteration . The quality of the solution is evaluated by a fitness function, which is a problemdependent function. If the current solution is better than the fitness of or , the best value will be replaced by current solution accordingly. This update process will continue until stopping criterion is met, usually when either maximum iteration is achieved or target solution is attained.
Therefore, many researchers have used PSO algorithms in their applications for solving all optimization problems. PSO algorithm is used to build a feasible path, in order to optimize in terms of fuel and threat cost for autonomous UAV 3D path planning [20], pose estimation by optimizing boxes properties [21], improve stability for UAV manipulator control system such as in [22][23][24]. In [25], PSO based also introduced to generate avoidance orbit. The calculation of the closest approach distance is obtained after determined the magnitude of the change of the two target values on the unique evaluation function.
In this project, PSO algorithm is applied to optimize matchematical function for collected data. Figure 3 shown a plotted data of speed and TTC for 0, 50, 100, 150 and 200 gram payload. The speed is irregular time series and was set to around 5 m/s maximum. The number of data for each payload is 152 set. This real data collected has shown a linear trend in increasing of speed. The average weather condition reading during experiments are recorded. The maximum of wind speed recorded throughout this experiment is 1.84 m/s. Figure 1. Data distribution plot of speed and TTC for different payload For each experiment, over than 200 data set were collected. After processing an overshoot filtering algorithm, 152 data set has been selected for our particle data input, for each weight. Each data set consists of two parameters, speed in m/s and time are required to stop (hovering in the air), which is called as TTC. All initialization parameters are same for each data set. For example, in Figure 4, the TTC linear model of TTC generated from data set of 0 gram payload. All initial parameters value for TTC's PSO algorithm in this project are shown in Table 1. For solving this TTC modelling, which is data collected from the real experimental data, the number of particles is chosen between 10 and 50. The fitness function evaluates the solution encoded in a particle. The objective of the fitness function, is to minimize the Mean Square Error (MSE) of two variables TTC form simulation, and TTC data from our experiments .as shown in (3). The size of our experiments data, is 152.
Based on the data collection, a linear relationship is considered to solve our optimization between speed and TTC can be written as in the Error! Reference source not found.); where, Time-to-Collision, second Horizontal speed of vehicle, m/s 1 , 2 Modelling parameters

RESULTS AND DISCUSSION
The performance of the PSO algorithm to determine the model of TTC is investigated using the simulation software. The algorithm is implemented using MATLAB and PSO's parameter initialization were used as shown in Table 2. The algorithm runs to a maximum number of iterations of 3000 and the particles positions are initialized randomly in the range of [0.0,1.0]. However, form the simulation results, the number of iterations can be reduced into below than 1000 to get consistent of MSE value as shown in Figure 5. Particles' velocities on each dimension are clamped to a maximum velocity, = 0.5 and = − . Stopping condition is set to the maximum iteration.
By implementing of the fit evaluation of MSE as in (3) for the experiment data with payload 0 gram acquired parameter values from (4) are 0.4832 and 3.8834 respectively. The best MSE found is 0.5810. Positive value for 1 indicates the increasing speed will be increasing value of time to collision are required.
The same parameter is used for all TTC data experiments with different payloads and modelling parameters, 1 and 2 shown in Table 2.  Based on this number of data, we have successfully develop a new method to estimate and modelling a TTC for quadcopter in the real environment with minimum equipment. Data-driven modelling approach can be implemented in order to construct a mathematical model of TTC.
Data distribution of UAV shows a linear relationship between speeds, payload and TTC. Two predictor variables is speed and payload. Otherwise, TTC is a forecast variable in second. The unit of each predictor variables is in m/s and gram respectively. Therefore, this problem can be written as a Linear Diophantine Equation for optimization of modelling. Diophantine equation is a polynomial equation, usually in two or more unknown variables. Therefore, TTC modelling equation can be written as in the (5) = 1 + 2 + 3 + 4 (5) where, TTCs is Time-to-Collision, s is Horizontal speed of vehicle, m/s, w is UAV payload and p1-4 is PSO parameters to optimize.

CONCLUSION
The method for modelling Time to Collision without braking control for outdoor quadcopter in the uncontrolled environments by using PSO optimization and MSE fit evaluation has been presented. A quadcopter test bed has been used as our research platform. Based on the on-board flight, TTC are measured from comparing both Channel 2 RCIN and GPS speed. Real experiments in the real environment are performed to gathering data and TTC data set has been successfully collected for each payload. Based on the simulation on the real data, the PSO result to get a minimize MSE between real data and PSO simulation has been successfully implemented. The two best parameters based on minimum MSE form 3000 times of interaction. The two parameters build a TTC model, which is can be used to assist CAS controller.