Solution to Bird Pest on Cultivated Grain Farm: A Vision Controlled Quadcopter System Approach

Birds invasion on rice cultivated field have been very disastrous specially in Africa. Most farmer have few options to manage these birds with traditional farmers and their children running up the field shouting, throwing stones and sometimes beating drums to scare birds away. This method and many other methods employed to address this issue are energy consuming and expensive and sometimes not effective at all. This study present the use of vision controlled quadcopter system to detect and chase these birds away from cultivated field. The method involves using robot vision to control the position of quadcopter in an attempt to follow the object while it produces scaring sounds such as bird distress call and predators call.


INTRODUCTION
Automatic control has played a vital role in the advance of engineering and science. In addition to its extreme importance in space-vehicle systems, missile-guidance systems, robotic systems, and the likes, automatic control has become an important and integral part of modern agriculture know as smart farming. This is a modern farming management concept using digital techniques to monitor and optimize agricultural production processes. For example, rather than applying the same amount of fertilizers over an entire agricultural field, or feeding a large animal population with equal amounts of feed, smart farming will measure variations in conditions within a field and adapt its fertilizing or harvesting strategy accordingly. Likewise, it will assess the needs and conditions of individual animals in larger populations and optimize feeding on a per-animal basis. Applying automation to every process of farming will increase the quantity and quality of agricultural output while using less input such as water, energy, fertilizers, pesticides and so on. It will save costs, reduce environmental impact and produce more and better food. Thus the aim of this study is to provide an automated solution to solving a problem in the food production process.

Problem Identification
Study by Oerke [1] shows that about 15% of global rice production is lost to animal pests (arthropods, nematodes, rodents, birds, slugs and snails). The Global Rice Science Partnership (GRiSP) identifies birds as the second most important biotic constraint in African rice production after weeds. The study was based on farmer surveys in 20 African countries [2]. Red-billed Quelea has been studied extensively and there are many publications describing its pest status and control strategies in African agriculture ( [3,4]. These birds have been identified as one of the most notorious pest bird species in the world, injurious to various cereal crops such as rice, millet, sorghum and wheat [5]. It occurs throughout sub-Saharan Africa. It gathers in flocks of several million birds and breeds in colonies that can cover more than 100 hectares with about 30,000 nests per hectare. de Mey, Demont [6] estimate annual bird damage to an average of 13.2% of the potential rice production during the wet seasons of 2003-2007, which translates into an average annual economic loss of €7.1 million. Oduntan, Shotuyo [7] estimates that 2 million red-billed quelea birds can destroy up to 50 tons of grain in a day, value equivalent of $600,000. Despite the huge damage caused by this pest and much international attention it had received in the past and is still receiving, little research on bird control is currently conducted. Presently, most farmers, along with their children and probably hired workers, run up the field shouting, throwing stones, waving, clapping hands and sometimes try to scare the birds away with drums and catapult. This process is depicted in figure 1. Humans detect the presence of birds using the eyes. Since human brains have been trained to recognize the kind of birds they are, thus, identification, classification, tracking and scaring is done with seamless effort. The brain activates body muscles which is a result of the shouting, throwing of stones and other activities to scare the birds away. This process can be represented in a control block diagram as shown in figure 2. In human-operated system, the eyes, brain and muscles correspond to the sensor, controller and pneumatic valve respectively. Effectiveness of this process requires a lot of human effort, time and cost

Computer Vision
Computer vision is a field of informatics. It is a way computers gather and interpret visual information from the surrounding environment. It involves detecting and recognizing object of interest. Usually the image is first processed on a lower level to enhance picture quality to remove noise. Then the picture is processed on a higher level, such as detecting patterns and shapes, to recognize object of interest [8,9]. A subsection in computer vision is robot vision which involves using a combination of vision sensors such as camera, computer algorithms and other hardware components to allow machine to process visual data from the real world to accomplish complex tasks that require visual understanding such as chasing an object away from a mapped out area. Table  1 shows the differences amongst the various subsection of computer vision which include robot vision Figure 3 Computer Vision Family Tree [10]  Source : [10] The process in figure 2 can be achieved using robot vision as depicted in figure 4. Object detection is commonly referred to as a method that is responsible for discovering and identifying the existence of objects of a certain class. An extension of this can be considered as a method of image processing to identify objects from digital images. A method of object detection refers to classifying objects in images according to colour for instance, robotic soccer, where different teams assembles their robots and go head to head with other teams. However, this colorcoded approach has its downsides. Experiments in the international RoboCup competition have shown that the lighting conditions are extremely detrimental to the outcome of the game and even the slightest ambient light change can International Journal of Engineering Research & Technology (IJERT) ISSN: 2278-0181 http://www.ijert.org prove fatal to the success or failure of any team. Participants need to recalibrate their systems several times even on the same field, because of the minor ambient light change that occurs with the time of day [11]. This type of detection is not suitable for most real world applications, just because of the constant need for recalibration and maintenance.
Thus, an advanced and sophisticated method is required for object detection. One such method is detecting objects from images using features or specific structures of the object of interest. An example of feature detection method is Haar-like features which was developed by Viola and Jones [12] on the basis of the proposal by Papageorgiou, Oren [13]. The method considers neighbouring rectangular regions at a specific location in a detection window. It sums up the pixel intensities in each region and calculates the difference between these sums. This difference is then used to categorize subsections of an image. Commonly, the areas around the eyes are darker than the areas on the cheeks. One example of a Haar-like feature for face detection is therefore a set of two neighbouring rectangular areas above the eye and cheek regions. Other improved methods include the use of local binary pattern features [14]. It is an operator for image description that is based on the signs of differences of neighboring pixels. It is fast to compute and invariant to monotonic gray-scale changes of the image. Despite being simple, it is very descriptive, which is attested by the wide variety of different tasks it has been successfully applied to [15]. The LBP histogram has proven to be a widely applicable image feature for example texture classification [16], face analysis [17], video background subtraction [18] and so on [19]. A possible drawback of the LBP operator is that the threshold operation in comparing the neighboring pixels could make it sensitive to noise. Histogram of gradient had also been used in object detection [20]. It is a shape descriptor that counts occurrences of gradient orientations in localized portions of an image.
Vision sensor such as camera is a major component in computer vision. A camera performs the perspective projection of a 3D point to the image plane. The image plane is a matrix of light sensitive cells. The resolution of the image is the size of the matrix. The single cell is called a "pixel". For each pixel of coordinates (u, v), the camera measures the intensity of the light. A 3D point, with homogeneous coordinates X = (X, Y, Z) project to an image point with homogeneous coordinates p = (u, v) as shown in figure 4 Where K is a matrix containing the intrinsic parameters matrix of the camera Where and are the pixels coordinates of the principal point, and are the scaling factors along the ⃗ and axes (in pixels/meters), ∅ is the angle between these axes and f is the focal length. For most of commercial cameras, it is a reasonable approximation to suppose square pixels (i.e. ∅ = 2 = and = ).
Vision-based control also known as visual servoing (VS), is a technique which uses feedback information extracted from a vision sensor to control the motion of a robot. In recent years, unmanned aerial vehicles (UAVs), which is a robot, have become a very active field of research and made a huge progress in automated navigation, surveillance, military application, rescue tasks and agriculture. Among various research areas on UAV, vision based autonomous control has become the main interest for the environment where GPS is denied. Vision-based control approaches generally use points as visual features.

Related Work
Robots are widely used today in agriculture tasks. Many of these tasks require machine vision algorithms to operate successfully. The robots and their machine vision algorithms change form to best suit their function, starting from fields plowing [21], seeds planting [22], weeds handling [23], growth monitoring, fruits and vegetables picking, sorting, grading and even packaging [24]. Since the focus of this study is mainly growth monitoring of crop with emphasis on rice crop, literature pertaining to the use of unmanned aerial vehicle for precision farming will be addressed in this work.
There has been an increase in interest in the development and use of unmanned aerial vehicles (UAVs) for agricultural and environmental applications. Reports indicate that agriculture industry could potentially be the largest user of this technology [25]. The practical applications of UAVs so far have occurred in Europe and in countries like Canada, Australia and Japan where there are fewer airspace regulations compared to United States [26]. Use of UAVs for commercial purposes is prohibited in the United States; only hobbyists are allowed to fly small, radio-controlled airplanes for recreational purposes. UAVs are currently being applied by farmers in wide field analysis of crop behavior such as rice, maize and wheat where they scan through the field, take images and report abnormality [27]. In Japan, Yamaha Industrial Unmanned Helicopters are small commercial viable helicopter UAVs to meet requirements for crop dusting and spraying [28]. Yamaha Aero Robot "R-50," is an industrialuse unmanned helicopter with a 20 kg effective load capacity. Currently, there are two broad platforms for UAVs, namely the 'Fixed Wing' and 'Rotary Wing' (copter) types. Fixed wing UAVs have the advantage of being able to fly at high speeds for long durations with simpler aerodynamic features. Some of them do not even require a runway or launcher for takeoff and landing. The rotary wing UAVs have the advantage of being able to take off and land vertically and hover over a target. However, because of mechanical complexity and shortened battery power, they have a short flight range. These UAVs fly up to an altitude of 400 feet and are able to follow the same path or GPS-guided routes daily, weekly or as desired. Cameras gather images with normal light, infrared or thermal, still photos or video formats. These images are digitized, geo-referenced and mapped. Crop consultants and farmers can use this information to scout crops, detect nutrient deficiencies, assess flood or drought damage, forecast weather patterns, monitor wildlife and even locate cattle in distant pastures. Research also reveals that UAV can be used for detecting atmospheric microbes and air pollution [29,30], spot-spraying chemicals and micronutrients [31]

Quadcopter Fundamentals
A quadcopter, as shown in fig 3, is a helicopter equipped with four motors and propellers mounted on each. Each opposite motors rotate in the same direction counter-clockwise and clockwise respectively. The conventional helicopter has a tail rotor for stability, this is absent in quadcopter due to its configuration of opposite pairs' directions. There are four basic movements governing the quadcopter movement to reach certain altitude and attitude. These are throttle, roll, pitch and yaw.
The throttle is achieved by concurrently increasing or decreasing all propeller speeds with the same amount and rate. This generates a cumulative vertical force from the four propellers, with respect to the body-fixed frame. As a result, the quadcopter is raised or lowered by a certain value.
The roll is provided by concurrently increasing or decreasing the left propellers speed and decreasing or increasing the right propellers speed at the same rate. It generates a torque with respect to the x axis which makes the quadcopter to tilt about the axis, thus creating a roll angle. The total vertical thrust is maintained as in hovering; thus this command leads only to a roll angular acceleration.  [32] The pitch, an opposite of the roll, is achieved by concurrently increasing or decreasing the speed of the rear propellers and by decreasing or increasing the speed of the front propellers at the same rate. This generates a torque with respect to the y axis which makes the quad-rotor to tilt about the same axis, thereby creating a pitch.
The yaw command is achieved by increasing (or decreasing) the opposite propellers' speed and by decreasing (or increasing) that of the other two propellers. It leads to a torque with respect to the z axis which makes the quadrotor turn clock wise or anti clock wise about the z-axis.

Quadcopter Mathematical Model
A survey of methods of modeling was carried out by [33] which had categorized these methods. Using Newton-Euler method which is based on Newton's second law equations on rigid body, a quadcopter has six degrees of freedom (6DOF) which are the translational motion (x,y,z) and the rotational angles (row, pitch and yaw). These motions are represented as (x,y,z, , , ). This is further divided as the inner loop and outer loop configuration as shown in Fig 6. The inner loop which are the Attitude (roll, pitch and yaw) and the Altitude (Z height) can be controlled using four proportional integral and differential (PID) controllers. The outerloop are the x and y position of the quadcopter in space and two more PID controllers can be used to control them. The output of these two controllers will be input to the roll and pitch controllers. The altitude, pitch, roll and yaw control are represented in equations 2, 3, 4 and 5 respectively. Where , and are the altitude PI-D controller parameters.
, and are the roll angle PI-D controller parameters.
, and are the pitch controller PI-D parameters. ( ℎ error) = des (desired pitch)mes (measured pitch). , and are the yaw angle PI-D controller parameters.
( error) = des (desired yaw)mes (measured yaw). The outer control loop outputs are desired roll and pitch angles, which they are the inputs to the inner loop for the desired X and Y position. The linear acceleration for the quadcopter is represented in equations 6 and 7.
Thus, the desired roll and pitch is as

Vision-Based Control
Controlling quadcopter movements using object of interest detected position will achieve an object following robot. The position of object in every single frame of a video provides route for the position of quadcopter at any given time. Components of the object's relative position, r, in the quadcopter reference frame as shown in Fig 7 can be determined using image principle as stated by [34][35][36]. Equation 11 shows the relationship of the desired yaw and detected object image in a frame. Controlling x and y position as well as the yaw angle will ensure a quadcopter bird chasing system. Equipping the system with other methods of bird deterrent signals such as predators call and bird distress sounds will ensure an effective deterrent system.

RESULTS AND DISCUSSION
In this section, the proposed position control method is evaluated based on simulations in MATLAB/SIMULINK. Using AR Drone 2.0 model [38], scenarios with different bird trajectories were tested as waypoints for the quadcopter position control.  Table 2 shows the tracked bird locations detected in different frames of a video. Table 3 shows the proportional, integral and differential (PID) gain. Table 4 shows the steady state oscillation amplitude, settling time within steady state oscillation and overshoot. Fig 8 shows the euler angles during flight for the simulation. Fig 9 shows the trajectories of bird and that of the simulated quadcopter. The result shows that following was successfully achieved.  This study presents an effective and reliable method of preventing birds invasion on rice farm using vision-based bird tracking and chasing quadcopter system. The system is easy to set up and the can be executed on a quadcopter. Finally, experimental results were presented which showed the actual performance of the proposed controller.