An Intelligent Grazing Development Strategy for Unmanned Animal Husbandry in China

: Grazing is the most important and lowest cost means of livestock breeding. Because of the sharp contradiction between the grassland ecosystem and livestock, the grassland ecosystem has tended to degrade in past decades in China; therefore, the ecological balance of the grassland has been seriously damaged. The implementation of grazing prohibition, rotational grazing and the development of a large-scale breeding industry have not only ensured the supply of animal husbandry products, but also promoted the restoration of the grassland ecosystem. For the large-scale breeding industry, the animal welfare of livestock cannot be guaranteed due to the narrow and crowded space, thus, the production of the breeding industry usually has lower competitiveness than grazing. Disorderly grazing leads to grassland ecological crises; however, intelligent grazing can not only ensure animal welfare, but also fully improve the competitiveness of livestock husbandry products. Under the development of urbanization, the workforce engaged in grazing and breeding in pastoral areas is gradually lost. Intelligent grazing breeding methods need to be developed and popularized. This paper focuses on intelligent grazing, reviews grass remote sensing and aerial seeding, wearable monitoring equipment of livestock, UAV monitoring and intelligent grazing robots, and summarizes the development of intelligent grazing elements, exploring the new development direction of automatic grazing management with the grazing robot at this stage.


Introduction
China is rich in grassland resources.Livestock husbandry based on grassland resources is an important part of agriculture.In recent years, the production of major livestock products in China has shown an overall upward trend [1].The year-end stock of beef cattle has increased year by year from 88.35 million in 2016 to 102.16 million in 2022, and beef production has shown a similar trend, increasing from 6.17 million tons in 2016 to 7.18 million tons in 2022.The production of mutton sheep fluctuated slightly, but overall showed an increasing trend, with the year-end inventory increasing from 299.31 million in 2016 to 326.27 million in 2022.The production of pork has been greatly affected by the African swine fever situation.The year-end stock of live pigs decreased from 442.09 million in 2016 to 310.41 million in 2019, and gradually rebounded, reaching 452.56 million in 2022.Pork production also showed a similar trend of change during this period, decreasing from 54.26 million tons in 2016 to 42.55 million tons in 2019, and gradually increasing until reaching 55.41 million tons in 2022 [2,3].The current development of the livestock industry can hardly meet people's needs in terms of quantity and quality and cannot keep up with the development of the times.Firstly, at the level of the ecological environment, the development of animal husbandry is inefficient, leading to waste of resources, environmental pollution and serious ecological problems.Secondly, at the level of ecological carrying capacity, especially in grassland pasture areas, the scale of animal husbandry production is expanding in a disorderly manner, and the livestock carrying capacity in the region seriously exceeds the ecological carrying capacity of the grassland, resulting in the phenomenon of grassland overgrazing [4].For example, due to unscientific grazing by pastoralists, pastures are degraded and land is exposed.At the same time, animals stampede on the soil, promoting land erosion and exacerbating soil desertification.According to survey data, the underground biomass of the light pastoral area is 497 g/m 2 and the above-ground biomass is 275 g/m 2 ; the underground biomass of the over-pastoral area is 203 g/m 2 , which is 40.85% of the light pastoral area; the above-ground biomass of the over-pastoral area is 85 g/m 2 , which is only 30.91% of the light pastoral area.It can be seen from this that with the increase in grazing intensity, both above-ground biomass and underground biomass will be greatly reduced.The emergence of this phenomenon has brought serious grassland ecological environmental problems [5].
Behind the steady progress of the "Grain for Green Project", the livestock industry plays an important role in relieving the sharp contradiction between grassland ecosystem and livestock.The breeding industry has standardized production objectives and high-tech facility technology, which can alleviate the crisis of resource poverty, reduce heavy manual labor and improve production efficiency [6,7].With the development of large-scale facilities in the breeding industry, the indoor breeding method has led to a series of problems, such as antibiotic abuse and low animal welfare [8].Compared with grazing, indoor breeding suffers with narrow spaces and noise, so that livestock can easily be in a subhealth state.Barn feeding not only increases the cost of livestock health maintenance, but also increases the risk of livestock diseases [9].Raising livestock by grazing can effectively improve the production quality of livestock husbandry [10].As in the old saying in China, "More grazing outdoor, less diseases and joy livestock", under good ecological conditions, grazing breeding stock has great advantages over barn feeding, it is has also the lowest cost and is the most economical breeding method for the effective utilization of a large area of natural grassland in China [11,12].However, in past decades, livestock husbandry production only paid attention to quantity and did not pay attention to quality, resulting in the serious overload of the grassland ecosystem.The fundamental reason is the deficiency in grassland ecological environment information and management, such as the forage yield information, which results in mistakes in estimating livestock carrying capacity and grazing planning [13].Moreover, the "Crop, Forage and Cash crop" balance rotation would help grass self-support and reduce forage imports [14].With the advancement in urbanization, more and more herdsmen choose to live in cities.The urbanization of pastoral areas promotes the transformation of herdsmen's livelihood, reduces the population of herdsmen and the livestock quantity, and indirectly protects the ecological environment of grassland in China.However, due to the financial burden and other reasons, many herdsmen still retain livestock in the pastoral area and the livestock are taken care of by family and friends or management who are hired to raise them, resulting in the reduction in herdsmen who are full-time engaged in animal husbandry and the concentration of livestock in the pastoral area [15][16][17].Facing the above problems, the development of intelligent grazing is a new idea.Intelligent grazing is a new livestock husbandry development mode based on Drones 2023, 7, 542 3 of 29 obtaining multi-source information, the "grazing + supplementary feeding" is the main breeding method, ecological balance is the goal, and an intelligent grazing management and control platform around a grazing robot is the technology platform [18].At present, there is no systematic and mature intelligent grazing system in China or other countries.In the guide to the key special project of "breeding of new livestock and poultry varieties and scientific and technological innovation of modern pasture" in the 14th five-year plan National Key R&D Program of China, "key technologies of intelligent grazing of natural grassland and precise control of grass and livestock" is the systematic exploration for intelligent grazing [19].At present, some key technologies for intelligent grazing have been matured and are widely employed in many applications.How to complete an intelligent grazing systematically is the main goal of this paper.Therefore, this paper will summarize the mature and widely used intelligent grazing technology and discuss the development direction of intelligent grazing.In this paper, the foundation of intelligent grazing is the information, which contains the grassland information from remote sensing, the position information of the livestock herd, the health condition information of each livestock.Aiming at how a UAV (Unmanned Aerial Vehicle) attracts sheep to move directionally, the research idea of "positive reinforcement" of Harper Adams University is adopted [20].As shown in Figure 1, the salt brick is mounted on the UAV, which attracts the leader of the sheep and the flock to move in a planned direction.After a period of training of the reward mechanism, the leader of the sheep can establish a positive relationship with the leading UAV carrying the salt brick so that the flock follows the planned flight path of the UAV for grazing.
Drones 2023, 7, x 3 of 31 tration of livestock in the pastoral area [15][16][17].Facing the above problems, the development of intelligent grazing is a new idea.Intelligent grazing is a new livestock husbandry development mode based on obtaining multi-source information, the "grazing + supplementary feeding" is the main breeding method, ecological balance is the goal, and an intelligent grazing management and control platform around a grazing robot is the technology platform [18].At present, there is no systematic and mature intelligent grazing system in China or other countries.In the guide to the key special project of "breeding of new livestock and poultry varieties and scientific and technological innovation of modern pasture" in the 14th five-year plan National Key R&D Program of China, "key technologies of intelligent grazing of natural grassland and precise control of grass and livestock" is the systematic exploration for intelligent grazing [19].At present, some key technologies for intelligent grazing have been matured and are widely employed in many applications.How to complete an intelligent grazing systematically is the main goal of this paper.Therefore, this paper will summarize the mature and widely used intelligent grazing technology and discuss the development direction of intelligent grazing.In this paper, the foundation of intelligent grazing is the information, which contains the grassland information from remote sensing, the position information of the livestock herd, the health condition information of each livestock.Aiming at how a UAV (Unmanned Aerial Vehicle) attracts sheep to move directionally, the research idea of "positive reinforcement" of Harper Adams University is adopted [20].As shown in Figure 1, the salt brick is mounted on the UAV, which attracts the leader of the sheep and the flock to move in a planned direction.After a period of training of the reward mechanism, the leader of the sheep can establish a positive relationship with the leading UAV carrying the salt brick so that the flock follows the planned flight path of the UAV for grazing.In this paper, the research and dynamic comparative analysis of key technologies for intelligent grazing in China and other countries are presented.Then, this paper further focuses on intelligent grazing, reviews from grass remote sensing and aerial seeding, wearable monitoring equipment of livestock, UAV monitoring and intelligent grazing robots, and summarizes the current development of intelligent grazing elements, explores the new development direction of automatic grazing management with grazing robots and proposes an intelligent grazing strategy with "Remote sensing, herd perception, guidance and control " as the core content.The main contributions summarized are as follows: (1) Aiming at the problems of the extensive area of natural grassland and fragile ecology in China, based on the research ideas of "remote sensing of pastoral areas, herd perception and guidance, health monitoring, periodic grazing track planning and control", a new model of integration of grazing and detection based on UAV formation is proposed.In this paper, the research and dynamic comparative analysis of key technologies for intelligent grazing in China and other countries are presented.Then, this paper further focuses on intelligent grazing, reviews from grass remote sensing and aerial seeding, wearable monitoring equipment of livestock, UAV monitoring and intelligent grazing robots, and summarizes the current development of intelligent grazing elements, explores the new development direction of automatic grazing management with grazing robots and proposes an intelligent grazing strategy with "Remote sensing, herd perception, guidance and control " as the core content.The main contributions summarized are as follows: (1) Aiming at the problems of the extensive area of natural grassland and fragile ecology in China, based on the research ideas of "remote sensing of pastoral areas, herd perception and guidance, health monitoring, periodic grazing track planning and control", a new model of integration of grazing and detection based on UAV formation is proposed.
(2) This paper analyzes the key technologies of intelligent grazing and proposes a detailed technical framework and implementation route, which include the remote sensing technology of UAVs in grazing areas, comprehensive monitoring of UAVs for the herds, the cyclical grazing path planning of UAVs, the formation tracking and surround control of UAVs, and other core technologies.
(3) Based on the constructed technical framework, this paper proposes a grid grazing area comprehensive classification method with multi-source data fusion and inversion of biomass information based on the self-learning model of scarce samples, designs the pastoral area perception technology based on deep learning and hybrid-driven key individual tracking, and introduces biological/abiotic hybrid formation control technology.

Pasture Remote Sensing and Grassland Ecological Maintenance Technology
Remote sensing is the most common way of monitoring the ecological environment and agricultural information, crop information acquisition and phenotypic detection [21][22][23].For different remote-sensing scales, different data sources and remote sensing platforms could be selected, such as ground-based sensors, medium and small-scale UAVs, manned aircrafts, and satellites.For pasture remote sensing, because of the short harvest period, for obtaining data of different growth periods, the attendance and adaptability show higher priority in platform selection [24][25][26].Ref. [26] achieved the remote sensing of weed invasion in alfalfa based on multispectral sensor and UAVs; the herbicide spray management could be concluded by the remote sensing results.Ref. [27] analyzed hundreds of crop phenotypes through the indices of biomass yield, plant height, NDVI (normalized difference vegetation index), leaf area index and ground coverage, all of the data are obtained by UAVs.Considering the interactive influence of natural grassland and grazing process on the utilization of natural grassland, Ref. [28] used GNSS equipment as the acquisition tool for grazing data, through the study of grazing temporal and spatial trajectory data, the temporal and spatial evolution mode of livestock feeding behavior were obtained, also the growth of natural grassland vegetation in combination with the existing natural grassland UAV remote-sensing estimation model were obtained, and then the livestock feeding and natural grassland grass were integrated and the utilization of natural grassland was evaluated according to the index above.Ref. [29] employed a UAV only equipped with a digital camera for a regression model of grassland vegetation coverage obtaining with parts of existing remote sensing data, the dynamic characteristics of grassland coverage during the growing season were analyzed by the obtained model.The RGB-D reconstruction method was used in Ref. [30] for plant height and biomass monitoring; furthermore, the difference between UAV-based RGB-D reconstruction and ground-based RGB-D reconstruction was discussed in application view.Tang et al. [31] focused on the phenotype modeling of alfalfa and the evaluation of model accuracy was carried out by UAV-based multispectral remote sensing in multiple test fields.In [32], the unmanned aerial vehicle remote sensing platform was used to collect the multi-spectral images of the experimental field and identify the sunflower growth period based on the different population features during its different growth periods.All of the UAV-based remote sensing methods above take full advantage of high attendance, high resolution, which are key elements for high frequency monitoring in the short growth cycle of pasture.
For intelligent grazing, pasture ecological maintenance technology is aimed at the degradation and restoration of pasture ecosystem and improving the primary productivity of pasture.It can be mainly divided into natural regulation and restoration means relying on the self-restoration ability of grassland ecosystem and auxiliary restoration means of manual intervention.For the natural self-restoration, there are mainly grazing prohibition, regional rotation grazing, etc., and for the auxiliary restoration means of manual intervention, there are mainly root cutting and loosening, grassland fertilization, forage supplementary seeding, etc.For natural self-restoration, Liu et al. [33] showed that under the condition of appropriate livestock carrying capacity, the restoration of natural conditions such as vegetation coverage can be realized through natural self-restoration without affecting the composition of the vegetation.Similarly, the research of Neilly et al. [34] shows that natural self-restoration can ensure the recovery of vegetation coverage after grazing stopped, but it cannot meet the requirements of rapid recovery.Therefore, human intervention for grassland biomass recovery in pastoral areas is necessary for intelligent grazing.Connor [35] et al. showed that under the condition of long-term grazing prohibition, the grassland ecology can be significantly improved, even for grassland with serious degradation.However, in the short term, only the restoration method with reduced grazing intensity as the core has little effect on the grassland improvement in the short term, which also proves the importance of human intervention for the short-term grassland ecosystem restoration.The research of Hailey et al. [36] showed that for grassland ecosystems with different ecological conditions and grazing intensity, the grassland ecological restoration period is expected to be 6 to 16 years without manual intervention for grassland management.
These research studies show that grazing prohibition, rotational grazing and other means need to be carried out under regular planning.For grazing prohibition, Porensky et al. [37] studied the impact of rotational grazing in cold and warm seasons on grassland restoration.The cold season is more sensitive to the frequency of rotational grazing.For rotational grazing management, regular time management can maintain the balance between grass and livestock in the long-term process.For rotational grazing, Mosier et al. [38] pointed out that under the conditions of high-density breeding and grazing, the efficiency of nitrogen and carbon fixation of rotational grazing is higher than that of default grazing.The key to rotational grazing is the accurate acquisition of pasture information.
Manual intervention combined with natural regulation can often obtain better results.The research of Davidson et al. [39] showed that for grassland ecological restoration, the introduction of appropriate plants can improve the effect of grassland restoration.Similarly, for the management of intelligent pasture, appropriate different forage combinations can improve the yield of pasture.Wang et al. [40] analyzed the soil's physical and chemical properties, soil biological communities, and the interaction between vegetation and soil of overgrazing grassland and concluded that good grazing management and human intervention can indirectly promote the restoration of grassland ecological capacity and improve the capacity of nitrogen and carbon fixation.Mesiga et al. [41] studied the distribution of nitrogen and phosphorus in grassland roots in different soil layers, providing a theoretical basis for specific grassland fertilization and improvement methods.Similarly, for the theoretical basis of forage fertilization, the research of Sun et al. [42] showed that the effect of magnesium on forage photosynthesis depends on the content of soil nitrogen.Once the soil's condition requirement is met, magnesium can effectively promote the efficiency of forage photosynthesis.The authors of [43] studied the root soil complex system in grassland ecosystems in detail and found that this system has an important contribution to grassland biodiversity.The study of the root soil complex is the key to increasing forage yield.Li et al. [44] designed a soil breaking and root cutting machine, for increasing grassland iteration through root cutting to increase forage yield.Zhang et al. [45] showed that compared with grazing, cutting promoted the decomposition of ground and root litter and promoted the growth of forage in the next year, and the forage harvested by cutting can be used for supplementary feeding, further increasing the yield of grassland forage.

Research on the Development of Intelligent Grazing
UAV-based intelligent grazing involves remote sensing, perception, guidance, control and other fields.Firstly, it needs to classify the grazing area to plan the grazing path.The classification of forage remote sensing images is based on deep learning, but the datasets of remote sensing images of pasture are insufficient.In order to solve the problem of insufficiency of training samples in remote sensing image classification based on deep learning, Rao et al. [46] proposed a spatial spectral relationship network (SS-RN) with limited training samples for hyperspectral classification to solve this problem.However, in the sample preprocessing stage, the method is complex, and the effect is general in solving the classification accuracy of scarce samples.In order to solve the problem of shortages of training sets, a model using the meta learning method is proposed in the intelligent grazing.The model can train the classifier from a small number of samples, and the knowledge learned from a dataset can easily adapt to a new dataset, and in an intelligent grazing strategy, using few-shot learning based on model-agnostic meta-learning (MAML) can not only solve the problem of scarcity of samples, but also have a good accuracy effect.
For the estimation of the natural grassland biomass of pasture, Sun et al. [47] used multi-rotor UAVs to obtain high-resolution multispectral images; thus, combined with the measured ground data, the estimation model of biomass and multi vegetation index was carried out by the regression analysis method based on the correlation analysis between the natural grassland aboveground biomass and the vegetation index.However, the biomass information is simple due to the complex structure of the sampling location, whether there is solar radiation deviation or certain information error.Zolkos et al. [48] compared different remote sensing ways of calculating ground biomass.Compared with other optical-based methods, it is concluded that the calculation of ground biomass based on an airborne LiDAR sensor is the most accurate, and the model obtained by integrating optical information and LiDAR information is more valuable for the estimation of data of the ground biomass.For the future intelligent development strategy, it is proposed to integrate the amount of multi-source data information, including airborne LiDAR and airborne multispectral image.The multispectral image is used for radiation correction to obtain the radiation correction model to eliminate the impact caused by solar radiation.At the same time, the LiDAR data are introduced to obtain the vegetation canopy height information.Combined with the airborne remote-sensing image data fusion, the model is established to discover the inversion model of grassland biomass and chlorophyll content, and, thus, the grassland biomass and chlorophyll content of the whole pastoral area are obtained.The method of multi-source data fusion can enrich the means of information acquisition, and the inversion of pasture remote-sensing information obtained from multiple channels can greatly improve the data accuracy of biomass estimation, so that its effect is also better.
Using intelligent grazing UAVs needs to complete herd perception, group counting and key individual perception of these three aspects of work.Han et al. [49] used a convolutional neural network to develop a herd detection method based on UAV remote sensing images.Taking Qinghai yak as the detection object, they solved the problems of difficult detection and low detection accuracy of large-scale grazing herds.Among them, UAV high-resolution remote sensing images and aerial view fields provided excellent detection conditions.Rivas et al. [50] developed a herd detection algorithm based on convolutional neural networks.The herd behavior is quite different from sheep, and the herd formation behavior is scattered, which is of significance for the perception of herd behavior.Similarly, Barbedo et al. [51] also studied herd detection based on a UAV platform.Barbedo et al. systematically explored various methods based on convolution neural networks and compared the detection effects of various methods in detail.The above three researchers have two things in common.The first is to conduct further research with the help of a UAV platform.The second is that they all apply their methods based on convolutional neural networks.Overall, both in China and abroad, many researchers have used convolutional neural networks to realize herd monitoring.The research of Barbedo et al. has shown that convolutional neural networks can realize stable and reliable herd detection after training with massive quantities of data.However, the method of obtaining high-resolution image information and convolution operation is completely adopted, which is simplistic.Sufficient samples are needed for training to obtain a better model.Therefore, for herd perception and group counting, the multi-source data fusion for scene segmentation and target tracking is necessary.Through the fusion of RGB three channel high-resolution herd information and herd high-resolution infrared image data, the scene is segmented to obtain the boundary position of the herd.At the same time, the attention mechanism is introduced to improve the segmentation accuracy.The thermal infrared image can eliminate the biological segmentation data through temperature threshold and reduce the computational power of the training model accordingly.The classification by using the herd body temperature and the classifier can further limit the overall noise of the perception system, to achieve accurate and stable herd flexible-group behavior perception.At the same time, the attention mechanism in deep learning can better extract the accuracy of scene segmentation.The model should be lightweight, and the method of transfer learning is used to count the specific herds using the thermal infrared images of herds.
For the perception of key individuals, such as leading sheep, wearing a special positioning sensor can obtain the most accurate position.Li et al. [52] used a 202 g satellite positioning module to locate sheep.The sampling period was 3 min, randomly selected 10 representative sheep for tracking statistics, and statistically analyzed the relationship between sheep behavior and walking speed during grazing.Among them, the accuracy of satellite positioning module cannot ensure accurate positioning.The sampling frequency is too low to achieve the goal of real-time grazing.Hu et al. [53] used radio frequency identification (RFID) as an electronic tag to cooperate with the UAV to detect herds.The UAV acts as a relay station to receive the data of the electronic tag and collect the return information of the electronic tag according to the given trajectory to determine the individual position.The above two researchers used the method of a communication module for livestock positioning, which improved the stability in low-sampling frequency.For the intelligent grazing of UAV formation, the frequency requirements in the grazing process are high, and the tradeoff between stability and frequency should be considered in application.The detection-based method mainly focuses on the individual semantic information, and pays less attention to the individual's position, speed and other motion information [54].Without this part of information, it is impossible to attract or drive the head sheep or stragglers.Therefore, in the future development strategy, the method of target tracking is used for key individual perception.Compared with the detection-based method, the tracking method based on convolutional neural networks has the characteristics of high coupling of adjacent periodic target motion information and strong anti-interference.It is suitable for the tracking of key individuals.For straggling sheep, the single UAV spiral half-enclosure technique is used to guide them into the group.Compared with the formation straggling guiding, it effectively reduces the number of UAVs and improves efficiency.
Aiming at the path-planning problem of UAVs, according to the task requirements and a certain planning algorithm, allows the optimal flight path to guide the UAVs to be generated [55].Among them, the task allocation and path planning of the UAV are the most important requirements in its operation [56].The task allocation problem is a complex combinatorial optimization problem (NP hard).At present, the models established by researchers according to task allocation generally include the traveling salesman model [57], vehicle routing model [58] and the extension of these two models [59].In application, if there are priority constraints in the traveling salesman model, the problem will become a more complex traveling salesman problem with priority constraints (TSP-PC), TSP-PC is a special case included in a TSP problem, a TSP-PC problem also belongs to an NP hard problem.Mingozzi et al. [60] added time window and related priority constraints when studying the TSP problem and obtained a dynamic programming algorithm.When solving the TSP-PC with a genetic algorithm, Moon et al. [61] proposed a prioritization method and a new crossover operator method to increase the diversity of solutions.Appropriate environment modeling can greatly enhance the path planning ability of the UAV.In environmental modeling, the grid method is a high-efficiency method, which cuts the flight environment of UAV into a series of grid areas of the same size and connected with each other, and each grid area corresponds to the corresponding information.Yuan et al. [62] proposed the improved A* algorithm to optimize the nodes of the path in the static environment with obstacles of different sizes, and finally solve the optimal and safest trajectory path.The Dijkstra algorithm is generally employed for solving in the static environment.This algorithm has a large search area priority [63].Yu et al. [64] proposed an improved algorithm based on Dijkstra and realized global path planning in the static environment, but there was a problem of slow searches in the local path, so it was difficult to quickly solve an optimal path without obstacles.Liu et al. [65] used the improved ant colony algorithm to combine pheromone diffusion and geometric local optimization in the process of finding the global optimal path, but a large amount of data should be stored in the search process.Based on this, the future development strategy was devised, of intelligent grazing plans to divide the grassland into different levels of playground areas, in which the grassland area with the lowest level is set as an obstacle area, and UAVs are prohibited from driving sheep in this area, so as to achieve the purpose of ecological restoration in the pastoral area.According to the growth of grassland grass resources and the comprehensive analysis of herding activities, the corresponding grazing path also changes with the change in date and season.Therefore, after setting several grazing paths and giving corresponding different constraints, the path is transformed into a multi-constraint optimal path control problem in a static environment.Finally, the sparrow search algorithm is used to find the global optimal path.Compared with other algorithms, it has very good abilities in global search and local development, takes all factors in the population into account, can take all factors in the population into account, it can make the sparrow in the population move to the global optimal value and can quickly converge near the optimal value, which is suitable for the path planning of pasture.
Next, we need to control the UAV formation to surround the herd and move according to the preset path, which means the trajectory tracking problem.The problem of trajectory tracking has a long history.Its core idea is to design a trajectory tracking controller to make the agent track the preset trajectory.At present, PID [66], backstepping control [67,68], sliding mode control [68][69][70][71] and model predictive control [72,73] are widely used.PID control is stable and widely used, but the UAVs' formation control requires high accuracy, and there is a time-varying time delay in the system, which is difficult to be effectively controlled.Although the robustness of the system is considered in sliding mode control, there are many occasions requiring curve fitting on the whole sliding mode surface, resulting in the complexity of the system.The control method based on model predictive control of the system through multiple iterations takes the optimal control quantity in each iteration, so that the system can have strong robustness and avoid the complexity of the algorithm.Zhou et al. [74] studied the trajectory tracking of time invariant formation according to the nonlinear model predictive controller and considered the collision avoidance problem as one of the performance indices.Therefore, in the future intelligent grazing strategy, a distributed consistency protocol is adopted for the control of formation.Based on the tracking and guidance of herds, a practical problem that needs to be considered is the time delay between formations, which will lead to communication obstruction and even UAV collision and crash.In order to prove that the system can converge only when there is time delay, it is necessary to construct an appropriate Lyapunov-Krasovskii function and deal with it appropriately to obtain the necessary and sufficient conditions for system stability [75].Considering that the scale of herds is constantly changing, the corresponding formation type also needs to change in real time.Mu et al. [76] used a multi-agent system to consider time-varying delay and time-varying formation at the same time and completed the encirclement of the target.However, the above consistency protocol does not take into account the problem of collision avoidance within the formation.The decentralized method is widely used in UAV cluster collision avoidance and obstacle avoidance [77].The decentralized method means that there is neither a control center nor information interaction with surrounding UAVs in a multi-UAV formation, and the formation is controlled only through the relative relationship with specific points in the formation.The artificial potential field method is a kind of decentralized method.By defining the equations of gravity and repulsion, the robot can move away from other robots or obstacles and move towards the target point at the same time.Liu et al. [78] proposed a UAV collision avoidance algorithm based on reinforcement learning, to approach the global optimal obstacle avoidance path in an unknown environment, to ensure that the UAV can quickly approach the target while Drones 2023, 7, 542 9 of 29 avoiding obstacles.In the future intelligent grazing strategy, the speed collision avoidance method is proposed to study the collision avoidance problem.The concept of a speed obstacle is given in the speed plane of the robot.According to the speed of other robots, an allowable speed half plane is deduced for each robot, and the optimal speed is selected by linear planning to ensure collision avoidance.The height of the UAV is controlled by a PID controller to realize three-dimensional collision avoidance, and the physical simulation is carried out by using multiple four rotor UAVs to better solve the obstacle avoidance problem inside the formation.

The Intelligent Grazing Development Strategy
The intelligent grazing development strategy will focus on improving the meat quality of the livestock in animal husbandry and sustainable development of grassland ecosystems as the main line of strategic research in the future.Aiming at the problems of the large and wide area of natural grassland and fragile ecology in China, in the future, the intelligent grazing development strategy will be implemented, and the automatic grazing management mode with grazing robots as the core will become a new development direction and a new model of integrated grazing and monitoring based on UAV formation will be established.The intelligent closed-loop thinking frame of the grazing is shown in Figure 2. According to the research ideas of "remote sensing of pastoral areas, herd perception and guidance, health monitoring, periodic grazing track planning and control", a new model of integration of grazing and detection based on UAV formation will be established.Airborne LiDAR data are fused with the multispectral images of radiometric correction.Based on physiological and biochemical indices and the structural characteristics such as vegetation canopy height, the grassland biomass in pastoral areas is inversed to evaluate the grass grades.An autonomous learning model based on scarce samples is introduced to predict pasture grades in rasterized grazing areas.Aiming at the herd perception and comprehensive health monitoring, firstly, a sufficient quantity of herd behavior data are collected, that is, the flexible herd behavior of herds under various influencing factors such as driving and attraction.The data form is RGB three-channel high-resolution image data and multi-source remote sensing data of herds, such as high-resolution thermal infrared image data.On this basis, a scene segmentation algorithm driven by multi-source data is developed, focusing on the movement change information of herds and the flexible boundary information of herds.Secondly, wearable devices based on deep learning classification and recognition are used for the sheep to sense and monitor individual behavior and the comprehensive monitoring of body temperature is completed with infrared equipment.At the same time, the hybrid-driven target-tracking algorithm is used to realize the perception of key individuals.And the hybrid driving guidance law is further designed to realize the tracking of stragglers by redundant UAVs.Aiming at cycle grazing path planning, the grazing area is divided into different comprehensive grades according to the richness of rasterized pasture, density and linear distance to the sheepfold.Then, the sheep dynamic counting, rational grazing capacity and other sensing monitoring are combined to determine the periodic grazing program.The grazing environment model is designed according to different scales of herds, obstacles and water sources.After considering the single-day path shortest constraint and the cycle path shortest constraint, the metaheuristic algorithm is used to realize the optimal planning of the cycle grazing trajectory.At the same time, for the areas with insufficient forage biomass detected by multi-source fusion data, UAVs are used for herbicide spraying, mixed sowing of high-quality forage, no-tillage seeding of forage, reseeding and restoring the degraded grassland, so as to solve the forage supply problem in grazing areas.Finally, in order to reproduce the constrained grazing trajectories of the herd, a stepping trajectory tracker of the herd is designed based on the periodic grazing track, leader position, herd boundary and stragglers.At the same time, the Active Disturbance Rejection Control based on indirect iterative learning is used to optimize the tracking controller and improve the anti-interference ability.For the straggler individuals, the single UAV spiral half-surrounded driving strategy is adopted to guide straggler individuals to regroup.Finally, a speed collision avoidance algorithm and time-varying formation consistency protocol are introduced to improve the robustness of UAVs formation.For the flight distance of UAVs, the intelligent grazing strategy proposed in this paper plans to use UAVs with long endurance flight capability, such as fuel-electric hybrid UAVs, hydrogen fuel cell UAVs, etc., to improve the flight distance and flight time of UAVs through energy supplements (such as charging, refueling, replacing hydrogen storage tanks, etc.) during flight.Based on the above method, the closed-loop intelligent grazing ecosystem strategy is constructed and the natural grazing means by combining the sky and land is formed to achieve the automatic monitoring, digital pen, intelligent grazing, perceived herd, the control technology platform of the information feedback interactive grazing management function, the enrichment of the application field of the UAV formation, improvement in the level of animal husbandry intelligence and achieve the future healthy ecosystem grazing requirements of intelligence and high quality.

The Remote Sensing of the Feeding Area Using the Sensing UAV to Solve the Perception Problem of Grazing Area and the Evaluation Technique of the Pasture Grade
In the process of obtaining remote sensing images by UAVs, external factors will inevitably cause image distortion, resulting in sample difference in different periods of pasture grade evaluation.Therefore, based on airborne multispectral data, the multispectral image is used for radiation correction to obtain the radiation correction model to eliminate the impact caused by solar radiation.In order to improve the accuracy of the inversion model, the vegetation canopy structure information is introduced through airborne Li-DAR data, and the point cloud segmentation is realized by integrating the abundance and the three-dimensional index model is constructed.The inversion model is established by combining with the fusion of airborne remote sensing image, and the inversion model of grassland biomass and chlorophyll content is established to invert the grassland biomass and chlorophyll content of the whole pastoral area, and the comprehensive evaluation of the two is carried out to determine the pasture grade in the rasterization area.On this basis, the autonomous learning model of pasture grade evaluation is established to characterize the characteristics of pasture grade in pastoral areas.At the same time, in view of the characteristic areas with low grade distribution, UAVs carry out seeding herbicide and mixed sowing of high-quality forage grass, and no-tillage sowing of forage grass and restoration of degraded grassland to solve the forage supply problem in grazing areas.The proposed intelligent grazing strategy has potential advantages such as driving the regional economy, protecting the grassland ecological environment, safeguarding people's livelihood in pastoral areas and can stimulate overcompensation growth of plants, effectively improving grassland ecology.This strategy can help farmers manage large grasslands or pastures, automatically monitor livestock movements, health status, dietary status, etc., provide more accurate data and decision support, and improve grazing efficiency and output.It can also reduce labor costs and labor demand.Traditional grazing requires farmers to supervise livestock activities for a long time, and intelligent unmanned grazing systems can replace heavy work, thus reducing labor burden.At the same time, the proposed strategy helps to improve the sustainable use and protection of grasslands.By precisely controlling the grazing range and time of livestock, combined with reasonable rotational grazing management, overgrazing and destruction of grassland can be avoided, which helps maintain the balance of nature of grassland, promote the recovery and growth of vegetation and reduce the risk of water and soil loss and environmental pollution.In the process of obtaining remote sensing images by UAVs, external factors will inevitably cause image distortion, resulting in sample difference in different periods of pasture grade evaluation.Therefore, based on airborne multispectral data, the multispectral image is used for radiation correction to obtain the radiation correction model to eliminate the impact caused by solar radiation.In order to improve the accuracy of the inversion model, the vegetation canopy structure information is introduced through airborne LiDAR data, and the point cloud segmentation is realized by integrating the abundance and the three-dimensional index model is constructed.The inversion model is established by combining with the fusion of airborne remote sensing image, and the inversion model of grassland biomass and chlorophyll content is established to invert the grassland biomass and chlorophyll content of the whole pastoral area, and the comprehensive evaluation of the two is carried out to determine the pasture grade in the rasterization area.On this basis, the autonomous learning model of pasture grade evaluation is established to characterize the characteristics of pasture grade in pastoral areas.At the same time, in view of the characteristic areas with low grade distribution, UAVs carry out seeding herbicide and mixed sowing of high-quality forage grass, and no-tillage sowing of forage grass and restoration of degraded grassland to solve the forage supply problem in grazing areas.

The Inversion Model of the Vegetation Biomass and the Chlorophyll Content in the Pastoral Area
For the remote sensing fine inversion, radiometric correction of airborne multispectral images is required before using the inversion strategy of fusion of airborne LiDAR data and airborne hyperspectral data.Airborne remote sensing images of UAVs are generally obtained by oblique rays of the sun at different angles, and radiation correction is mainly divided into solar height angle correction and azimuth correction, both of which have the same correction method.Solar azimuth has little influence on the spectral characteristics of remote sensing images, so the error is generally ignored.Therefore, the sun height angle correction is mainly used, and remote sensing images with the sun angle of 0 • can be obtained by correcting the average pixel value of the image.
The vegetation biomass of the pastoral area refers to the total amount of plants contained in the grassland per unit area, which can directly reflect the grassland biomass of a certain area.The chlorophyll content represents the growth status of vegetation which is related to the photosynthesis and nutrition status of herbage.The biomass and chlorophyll content of herbage are of great significance to guide the equivalence classification of herbage.For the remote sensing inversion, a fusion inversion scheme of airborne LiDAR data and airborne hyperspectral data can be used to establish a high-precision inversion model.The process of establishing the inversion model of the vegetation biomass and chlorophyll content of herbage is consistent, and the inversion model is established with the vegetation biomass as the model.
The 3D reconstruction technique of the laser radar can directly obtain the distance information of the target object surface by non-contact scanning mode, and then obtain the 3D point cloud data of the object surface.The complete 3D information of the target object can be obtained by rotation and movement [79].The LiDAR consists of target transmitter and receiver, which can obtain accurate 3D information by measuring the time of the light pulse from transmitting to returning to receiver to obtain the spatial position of target object.The LiDAR is pretreated by mathematical morphological filtering, including open and closed operations.The two algorithms are composed of expansion and corrosion operations and are widely used in image processing.In the process of point cloud data, the ground point cloud is extracted by open operation, that is, the ground point cloud is removed.Then, the digital elevation model (DEM) and the digital surface model (DSM) obtained by point cloud classification are used to convert the canopy height model (CHM).
The grassland in pastoral areas is mainly distributed by herbage, but there are some shrubs, soil, wildflowers and other different ground object types.For example, shrubs such as Amygdalus mongolica, Ammopiptanthus mongolicus and Nitraria tangutorum are common in the grasslands of Inner Mongolia, China [80].There are many different ground object types in the instantaneous field of view corresponding to the pixels in the multi-spectral remote sensing detection of grassland, resulting in the spectral information composed of grassland, soil, water, low shrubs and other types, thus forming the phe-nomenon of mixed pixels.Therefore, in order to obtain the purity of grassland spectral information, it is necessary to establish a reasonable decomposition model for the mixed pixel phenomenon.First, the number of endmembers is confirmed, including pasture, soil, low shrubs such as nitraria tangutorum, amygdalus mongolica and other endmembers.By judging whether the extracted endmembers are sufficient to contain most of the information of the image, the extracted endmembers and the abundance of the inversion are usually used to remix the images.Then, the difference degree of anti-mixing images is the evaluation of the completeness degree of endmembers and the abundance inversion results.The metaheuristic optimization algorithm is used to transform the problem into an optimization problem by taking the mean square error of the antimixing image and the original image as the objective function, and, then, the optimal set of endmembers can be obtained.The obtained abundance data are segmented into valid ground object points to solve the point cloud segmentation problem.
For the remote sensing images after radiometric correction and super-resolution reconstruction, different vegetation index features need to be obtained through linear combination between different bands.The obtained canopy height model is combined with different vegetation index features for the fusion inversion.Firstly, near-infrared indices such as DVI, EVI, NDVI, and SR, red edge indices such as CIG-RE1, CIG-RE2, NDVIre1 and MSRren, and short-wave infrared indices such as MDI1 and MDI2, are used as the vegetation indices.LiDAR is used to extract height indices such as tree height, canopy width and canopy diameter and canopy volume indices which include canopy coverage, leaf area density index and canopy thickness index.The linear regression model of vegetation biomass is established based on the vegetation index and LiDAR index.The biomass estimation is obtained by solving the linear multiple regression model.Then, the linear estimation problem is transformed into a fuzzy problem because the estimation of biomass is combined with abundance information and the fuzzy strategy is used to build the nonlinear inversion model of vegetation biomass.Finally, the exact value of vegetation biomass is obtained.

The Grazing Grade Assessment and the Autonomous Learning Assessment Model under the Scarce Samples
Because the factors affecting the grade of the grazing area include many factors, such as the biomass, growth status of herbage, etc.However, it is mainly used to set different grade weight coefficients by vegetation biomass and chlorophyll content, so that the joint evaluation can realize the determination of the forage grade in the grid area.Before training the self-learning model, labels should be divided for the grid pastoral areas according to the inversion biomass, and labels for pasture grades of the grid pastoral areas should be established according to the grazing situation of the pasture.Due to the lack of sample datasets in pasture remote sensing images, the biological information and chlorophyll content of the pasture can be inverted through airborne imaging equipment, and, then, the grade label evaluation is performed to obtain the label value of the grid area.The engineering is complicated, so the problem of sample scarcity is very likely to exist.In view of such problems, the intelligent grazing development strategy adopts the MAML model to solve the problem of remote sensing qualitative analysis under the few-shot learning.Because the MAML model has rapid adaptation in solving few-shot learning problems, it does not limit the model architecture or expand the number of learning parameters and can be used in different kinds of loss functions.It also has excellent performance in finding the optimal initial parameters and can be applied to almost any network model.Therefore, it can be seen from Figure 3 that MAML is applied to supervised learning algorithms for fusion and the optimal initial parameters are found to speed up the training speed, increase the generalization of the model and achieve a good classification effect based on scarce samples when dealing with the new remote sensing image classification task.After the training of the model, the fine tuning of a small number of samples is needed to achieve a good classification effect each time for the new grid pastoral area classification.According to the predicted classification results of the model, the pasture grade of the pastoral area can be divided, and ecological compensation optimization and sustainable utilization of the pastoral area can be realized.can be used in different kinds of loss functions.It also has excellent performance in finding the optimal initial parameters and can be applied to almost any network model.Therefore, it can be seen from Figure 3 that MAML is applied to supervised learning algorithms for fusion and the optimal initial parameters are found to speed up the training speed, increase the generalization of the model and achieve a good classification effect based on scarce samples when dealing with the new remote sensing image classification task.After the training of the model, the fine tuning of a small number of samples is needed to achieve a good classification effect each time for the new grid pastoral area classification.According to the predicted classification results of the model, the pasture grade of the pastoral area can be divided, and ecological compensation optimization and sustainable utilization of the pastoral area can be realized.

Multiple batch tasks
For the each batch of tasks

Minimize the loss and calculate the gradient
The optimal parameters for each batch The supervised learning algorithms

Minimize the loss and calculate the gradient
The optimal initial parameters MAML support set MAML query set

The Comprehensive Monitoring Technology of the Sensing UAV for the Herds
As typical flexible groups, the changes in the groups are irregular in the grazing process, so it is impossible to describe the overall group information by modeling at the present stage.Therefore, the intelligent grazing development strategy plans to design a set of comprehensive monitoring system based on UAV.In view of the problem of the perception of flexible herd behavior, the method based on deep learning is proposed to be used to perceive it.

The Comprehensive Monitoring Technology of the Sensing UAV for the Herds
As typical flexible groups, the changes in the groups are irregular in the grazing process, so it is impossible to describe the overall group information by modeling at the present stage.Therefore, the intelligent grazing development strategy plans to design a set of comprehensive monitoring system based on UAV.In view of the problem of the perception of flexible herd behavior, the method based on deep learning is proposed to be used to perceive it.

The Group Scene Segmentation and Dynamic Counting Based on Multi-Source Data
The data acquisition of intelligent grazing intends to adopt the herd flexible sensing algorithm as the scene segmentation algorithm based on a multi-source data-driven algorithm, while the data-driven algorithm and training dataset largely determine the stability and accuracy of the algorithm.Based on the multi-source data-driven method, we can learn from each other fundamentally and integrate the advantages of multi-sensors.As the lead UAV needs to obtain the vision of the global field of the herd, when the herd scale reaches 1000 heads, the resolution of the RGB three-channel high-resolution image dataset and high-resolution thermal infrared image data of the herd is initially set at 1080P.The moving speed of the herd is relatively slow, so the sampling frequency of the sensor is temporarily set at 30 Hz.According to the number of herds, large herds, medium herds and small herds each sample more than 1000 groups of datasets with no less than 100 frames in each group.The duration of data collection should be normally distributed as far as possible.The accuracy and stability of scene segmentation algorithm are ensured through accurate and large datasets.Figure 4a is the dataset of the first part, which is the high-resolution image set of the RGB three-channel of the herd.Figure 4b is the dataset of the second part, which is the high-resolution thermal infrared image data of the herd.The sheep temperature obtained from the survey can be used to set the temperature range to preliminarily screen out the position of the herd.
frames in each group.The duration of data collection should be normally distributed as far as possible.The accuracy and stability of scene segmentation algorithm are ensured through accurate and large datasets.Figure 4a is the dataset of the first part, which is the high-resolution image set of the RGB three-channel of the herd.Figure 4b is the dataset of the second part, which is the high-resolution thermal infrared image data of the herd.The sheep temperature obtained from the survey can be used to set the temperature range to preliminarily screen out the position of the herd.At the present stage, the main direction of scene segmentation algorithm is based on the FCN network, and the segmentation weight of the original image is reasonably planned to avoid network training falling into local optimal.The scene segmentation algorithm that is shown in Figure 5 adopted by the intelligent grazing strategy introduced high-resolution thermal infrared images of the herd to suppress the noise and prevent the model from falling into local optimum with the idea of multi-source sensor fusion.Meanwhile, the attention mechanism is added to improve the accuracy.First of all, the RGB image data of the three-channel of the herd and thermal infrared image data are high-resolution image data, when the size of the convolution kernel is fixed, if the feature weights are equally distributed, because most of the information shown in the figure is non-herd information, the feature weights of herds are diluted by a large number of other features.In the deconvolution process, the neural network cannot pay attention to more details of the target, resulting in a poor herd segmentation effect.Therefore, the attention mechanism is used to redistribute the feature weights to train the attention model and give more weight to the related features of the herds and retain more herd information in the deconvolution process.
The input of thermal infrared herd images is another way to improve the noise processing of scene segmentation algorithm based on convolutional neural networks.In case of misidentification in areas with no flocks or single sheep, the thermal infrared can be identified from the area of temperature by using the sheep temperature for screening, coupled with the detection method based on classifier screening, which further limits the overall noise of the perception system, so as to achieve accurate and stable herd flexible group behavior perception.
The working module of herd dynamic counting is the herd dynamic detection model, which has two functions.Firstly, it is responsible for the herd dynamic counting with the First of all, the RGB image data of the three-channel of the herd and thermal infrared image data are high-resolution image data, when the size of the convolution kernel is fixed, if the feature weights are equally distributed, because most of the information shown in the figure is non-herd information, the feature weights of herds are diluted by a large number of other features.In the deconvolution process, the neural network cannot pay attention to more details of the target, resulting in a poor herd segmentation effect.Therefore, the attention mechanism is used to redistribute the feature weights to train the attention model and give more weight to the related features of the herds and retain more herd information in the deconvolution process.
The input of thermal infrared herd images is another way to improve the noise processing of scene segmentation algorithm based on convolutional neural networks.In case of misidentification in areas with no flocks or single sheep, the thermal infrared can be identified from the area of temperature by using the sheep temperature for screening, coupled with the detection method based on classifier screening, which further limits the overall noise of the perception system, so as to achieve accurate and stable herd flexible group behavior perception.
The working module of herd dynamic counting is the herd dynamic detection model, which has two functions.Firstly, it is responsible for the herd dynamic counting with the calculation of dynamic carrying-capacity of pastoral areas; secondly, it is responsible for eliminating non-herd biological segmentation data from herd thermal infrared images.Considering the occupation of intelligent computing force, the herd dynamic detection module tries to meet the requirements of model lightweight under the condition of meeting the requirements of accuracy.The YOLOv4 lightweight model is designed and the transfer learning method is adopted.The RGB three-channel high-resolution image dataset with different number scales of each herd is used as the training set to obtain the dynamic counter, which is assisted with visual rules and temperature measurement to determine the effective count, so as to improve the accuracy of the group dynamic counting [81].

The Wearable Monitoring System of Herd Health and Individual Behavior
In the grazing process, individual behaviors in the herd mainly consist of grazing behavior and stress responses, of which grazing behavior includes feeding, rumination and other behaviors, and stress responses include heat stress, noise stress and other stress behaviors.Grazing behavior can further predict the physical condition of livestock and pasture conditions, while stress responses can affect or even destroy herd behavior.In the intelligent grazing strategy, it is planned to build low-cost wearable devices based on a combination of cameras and microphones, with eye-catching color features such as straps and other markers, to record sheep's first-view video data and sheep's voice data.The wearable device is fastened between the horns of the sheep's head by means of fasteners such as straps with special color markings.The special color marker is designed to identify the RGB three-channel herd image data from the top view of the UAV and a spatial position connection is with the UAV.The position information of sheep with wearable devices is also obtained in the top view.Taking the effective sound collection range of the microphone module and the acquisition range of the first-view camera image as the boundary, the individual behavior of sheep in this area can be effectively monitored and identified.The schematic diagram of the wearable device is shown in Figure 6.

The microphone module
The fixtures with characteristic markings (shown as the colors) The intended wearing position  "The herd effect" is the conformity that is a very important characteristic of individual sheep in herds.The first perspective of sheep is usually towards the herd or towards the direction of more sheep, which means, "grouping" in group behavior.It can provide rich information for individual behavior identification and cognition of sheep.The field of view from the first perspective has a certain monitoring effect on the herd, and with special markers, the position of the sheep with markers can be easily deduced from the image data of the herd.In addition, the first-view video can identify the behavior of some sheep without wearable devices, so as to partially recognize the individual behavior of other sheep in the herd, as shown in Figure 7a.In addition, when the sheep perform grazing behaviors, according to the different behaviors, the change in perspective brought about by the raising and lowering of the sheep's heads can be used as an important feature of image recognition, as shown in Figure 7b.For the behavior recognition in the intelligent grazing development strategy, the behavior recognition can be based on video clips or each frame of a picture.It is necessary to recognize the behavior of the sheep based on the few-shot technique, such as the fewshot action recognition framework proposed in [82], which enhances class-specific feature discriminability.The image classification method is used to recognize the behavior of sheep wearing monitoring devices.The image detection method is used to recognize the behavior of sheep without wearable devices and within the field of vision.The above two tasks, which are the image classification and image detection, are hot research issues in the field of computer vision.In addition, existing technologies such as Alexnet, GoogLenet and other deep learning based on image classification technologies, as well as deep learning based on image detection technologies represented by YOLO, can be trained with large-scale datasets, and the efficiency and accuracy are far superior to manual work.And for the above technologies, there is in-depth research on the lightweight of computing power, which can meet the needs of low computing power occupancy.In view of this problem, under the condition that the grazing time is sufficient, the data scale can fully meet the above methods based on deep learning, and there are a few categories of grazing behaviors with obvious characteristics.It is not difficult to complete efficient and accurate recognition and cognition based on the above methods, which is reliable high performance, thus, the above technology will not be repeated here.

The Key Individual Perception and the Tracking Technique
For the perception tracking of key individuals, the SiamFC [83] is adopted as the tracker.The SiamFC is a typical tracker based on convolutional neural network.Through training with a large amount of data, a data-driven tracker can be obtained.By importing large amounts of data for training, you can obtain data-driven trackers.In order to avoid the UAV falling into the state of mechanical tracking, the tracker is used to predict the bounding box of the next sampling period, and the UAV is guided to flight according to the prediction results.The design idea is shown in Figure 8: For the behavior recognition in the intelligent grazing development strategy, the behavior recognition can be based on video clips or each frame of a picture.It is necessary to recognize the behavior of the sheep based on the few-shot technique, such as the fewshot action recognition framework proposed in [82], which enhances class-specific feature discriminability.The image classification method is used to recognize the behavior of sheep wearing monitoring devices.The image detection method is used to recognize the behavior of sheep without wearable devices and within the field of vision.The above two tasks, which are the image classification and image detection, are hot research issues in the field of computer vision.In addition, existing technologies such as Alexnet, GoogLenet and other deep learning based on image classification technologies, as well as deep learning based on image detection technologies represented by YOLO, can be trained with large-scale datasets, and the efficiency and accuracy are far superior to manual work.And for the above technologies, there is in-depth research on the lightweight of computing power, which can meet the needs of low computing power occupancy.In view of this problem, under the condition that the grazing time is sufficient, the data scale can fully meet the above methods based on deep learning, and there are a few categories of grazing behaviors with obvious characteristics.It is not difficult to complete efficient and accurate recognition and cognition based on the above methods, which is reliable high performance, thus, the above technology will not be repeated here.

The Key Individual Perception and the Tracking Technique
For the perception tracking of key individuals, the SiamFC [83] is adopted as the tracker.The SiamFC is a typical tracker based on convolutional neural network.Through training with a large amount of data, a data-driven tracker can be obtained.By importing large amounts of data for training, you can obtain data-driven trackers.In order to avoid the UAV falling into the state of mechanical tracking, the tracker is used to predict the bounding box of the next sampling period, and the UAV is guided to flight according to the prediction results.The design idea is shown in Figure 8: As shown in Figure 8, in the first stage, the training set needs to be prepared.The production of the training set requires two sets of truth values for training.The sampling period that is called P is set as the prediction step, and the minimum unit is a camera refresh cycle.When making the correspondence of the truth value, the target template at the moment should correspond to the truth value of the next sampling period and the moment is called the T. That is, when training the tracker, the corresponding time truth value which is the T+P moment makes the neural network learn to predict the location of the target in the next sampling period.In the design of the Siamese network, AlexNet [84] is used as the feature extraction kernel, and the 2D convolution is used to obtain the predicted value of the relevant position.The Siamese network obtains two outputs, one is the predicted position and the other is the current position.And the output traditional bounding box should be converted to the 3D bounding box.The output of the current position is used to stably track the leader, and the output of the predicted position is used to cooperate with the design of the guidance law to guide the redundant UAV to catch up with the stragglers in time.

The Cycle Grazing Path Planning Using the UAV
In the UAV path planning, in order to reduce the length of the path, the point-topoint and area-to-area linear path planning are often adopted, without considering other conditions in the intermediate area.In practice, there are grassland degradation areas between the two parts of grassland, so before the path planning of the UAV, the grassland is divided into different levels of grassland areas, among which the grassland area of the lowest quality level is set as an obstacle area, and the UAVs are prohibited to herd in this area, so as to achieve the purpose of ecological restoration in the pastoral area.The activities of sheep flocks will strongly affect grassland ecosystems in pastoral areas, including the changes in vegetation composition and species diversity.Taking into account the longterm sustainable development of grassland ecology, the method of grazing in rotation is adopted to change the current situation of grazing on the slopes in the past, so as to protect the grassland and enhance the regeneration capacity of grassland ecological grass resources.
According to the actual experience and the change in date and season in the actual scene, a cycle path grazing design is designed based on the carrying capacity, light intensity and precipitation of date change.Different grazing paths are set in each cycle, and independent target pastures are set in each path.The meadows of different grazing paths are not repeated.After grazing for a cycle length, the UAV traverses all target pastures in the region.The yield of edible herbage in a certain area is obtained by obtaining parameters such as the yield of the per unit area and forage regeneration rate in the first full grass As shown in Figure 8, in the first stage, the training set needs to be prepared.The production of the training set requires two sets of truth values for training.The sampling period that is called P is set as the prediction step, and the minimum unit is a camera refresh cycle.When making the correspondence of the truth value, the target template at the moment should correspond to the truth value of the next sampling period and the moment is called the T. That is, when training the tracker, the corresponding time truth value which is the T+P moment makes the neural network learn to predict the location of the target in the next sampling period.In the design of the Siamese network, AlexNet [84] is used as the feature extraction kernel, and the 2D convolution is used to obtain the predicted value of the relevant position.The Siamese network obtains two outputs, one is the predicted position and the other is the current position.And the output traditional bounding box should be converted to the 3D bounding box.The output of the current position is used to stably track the leader, and the output of the predicted position is used to cooperate with the design of the guidance law to guide the redundant UAV to catch up with the stragglers in time.

The Cycle Grazing Path Planning Using the UAV
In the UAV path planning, in order to reduce the length of the path, the point-topoint and area-to-area linear path planning are often adopted, without considering other conditions in the intermediate area.In practice, there are grassland degradation areas between the two parts of grassland, so before the path planning of the UAV, the grassland is divided into different levels of grassland areas, among which the grassland area of the lowest quality level is set as an obstacle area, and the UAVs are prohibited to herd in this area, so as to achieve the purpose of ecological restoration in the pastoral area.The activities of sheep flocks will strongly affect grassland ecosystems in pastoral areas, including the changes in vegetation composition and species diversity.Taking into account the long-term sustainable development of grassland ecology, the method of grazing in rotation is adopted to change the current situation of grazing on the slopes in the past, so as to protect the grassland and enhance the regeneration capacity of grassland ecological grass resources.
According to the actual experience and the change in date and season in the actual scene, a cycle path grazing design is designed based on the carrying capacity, light intensity and precipitation of date change.Different grazing paths are set in each cycle, and independent target pastures are set in each path.The meadows of different grazing paths are not repeated.After grazing for a cycle length, the UAV traverses all target pastures in the region.The yield of edible herbage in a certain area is obtained by obtaining parameters such as the yield of the per unit area and forage regeneration rate in the first full grass stage, and it is converted into a standard edible hay amount in pastoral areas.By obtaining the daily food intake of the sheep and the grazing days of the herdsmen, the reasonable stocking capacity of the pastoral grassland in a certain area can be obtained.The grazing cycle plan is conceived as a mathematical description based on light intensity, reasonable stocking capacity in a certain area, and precipitation in the entire pastoral area on a certain date to obtain the periodic grazing plan on a certain date.
For the large, medium and small sheep size, the number of sheep is set as N, and the grazing area of the whole grazing area is set as V.According to the grazing area of each sheep which is set as S, the whole grazing area is divided into the area that is set as NS.Grid pastoral areas are graded according to the inversion biomass of grid pastoral areas, and the whole pastoral area can be divided into multiple grid pastoral areas with different labels, as shown in Figure 9.
Drones 2023, 7, x 19 of 31 stage, and it is converted into a standard edible hay amount in pastoral areas.By obtaining the daily food intake of the sheep and the grazing days of the herdsmen, the reasonable stocking capacity of the pastoral grassland in a certain area can be obtained.The grazing cycle plan is conceived as a mathematical description based on light intensity, reasonable stocking capacity in a certain area, and precipitation in the entire pastoral area on a certain date to obtain the periodic grazing plan on a certain date.
For the large, medium and small sheep size, the number of sheep is set as N, and the grazing area of the whole grazing area is set as V.According to the grazing area of each sheep which is set as S, the whole grazing area is divided the area that is set as NS.Grid pastoral areas are graded according to the inversion biomass of grid pastoral areas, and the whole pastoral area can be divided into multiple grid pastoral areas with different labels, as shown in Figure 9.In Figure 9, the green area of the pastoral area represents the area with sufficient pasture biomass and the best grade; the yellow area represents the medium area with average pasture abundance; and the blue area represents the forbidden area of the lowest grade area with scarce pasture biomass.The path planning of UAVs was regarded as a particle moving on a two-dimensional plane.In the two-dimensional plane, the area with the worst grade of grassland was set as no-fly zone, and other grids were regarded as accessible and barrier-free zone.In Figure 9, the green area in the pastoral area represents the area of the best grade with sufficient grassland biomass, the yellow area in the pastoral area represents the area of the middle grade with average forage abundance, and the blue area in the pastoral area represents the banning grazing area of the lowest grade with scarce grassland biomass.The path planning of the UAV is regarded as a particle moving on a two-dimensional plane.In the two-dimensional plane, the area with the lowest grade is set as the banning grazing area, and other grids are regarded as a passable barrier-free area.
The path planning of UAVs requires that a UAV must stay in each grassy area for a certain amount of time, which means the grazing time of sheep.The time is related to the size of sheep, grade of the pastoral area and the area of grid grassland.Based on the grade of the grassland in the region, the distance that is traversing all the grid grazing areas and returning to the sheep pen is added to conduct comprehensive description grade evaluation.According to the grade evaluation results of the model, the existing grazing areas can be divided into different grazing grades, so as to obtain grazing grades and realize the establishment of grazing environment model.In Figure 9, the green area of the pastoral area represents the area with sufficient pasture biomass and the best grade; the yellow area represents the medium area with average pasture abundance; and the blue area represents the forbidden area of the lowest grade area with scarce pasture biomass.The path planning of UAVs was regarded as a particle moving on a two-dimensional plane.In the two-dimensional plane, the area with the worst grade of grassland was set as no-fly zone, and other grids were regarded as accessible and barrier-free zone.In Figure 9, the green area in the pastoral area represents the area of the best grade with sufficient grassland biomass, the yellow area in the pastoral area represents the area of the middle grade with average forage abundance, and the blue area in the pastoral area represents the banning grazing area of the lowest grade with scarce grassland biomass.The path planning of the UAV is regarded as a particle moving on a two-dimensional plane.In the two-dimensional plane, the area with the lowest grade is set as the banning grazing area, and other grids are regarded as a passable barrier-free area.
The path planning of UAVs requires that a UAV must stay in each grassy area for a certain amount of time, which means the grazing time of sheep.The time is related to the size of sheep, grade of the pastoral area and the area of grid grassland.Based on the grade of the grassland in the region, the distance that is traversing all the grid grazing areas and returning to the sheep pen is added to conduct comprehensive description grade evaluation.According to the grade evaluation results of the model, the existing grazing areas can be divided into different grazing grades, so as to obtain grazing grades and realize the establishment of grazing environment model.
The goal of path optimization is to find the shortest and optimal path to meet the movement conditions of the UAV.First, the grid of all edible grazing areas in the grazing area are passed just once and the sheep stay there for a while during the course of a week.Second, it is set that higher priority grid pasture areas within a pastoral area must be visited and stayed in before lower priority grid pasture areas.That is, before visiting the pasture grid area with a lower priority in the pastoral area, it is necessary to ensure that other task grid areas with a higher priority have been accessed.A mathematical description of the path optimization problem of the UAV can be obtained.This means that the two-layer optimization objective function requires the shortest path length in the whole cycle and the shortest path length in each day of the cycle [85].Therefore, the objective function can be established according to the task area of the pastoral area carried out by the UAV.For the selection of path optimization algorithm, there are some meta-heuristic algorithms such as sparrow search algorithm (SSA) [86], condor optimization algorithm [87], bat optimization algorithm [88] and so on.

The Tracking and Encircling Control of the UAV Formation
When the UAV formation is used to control and track the preset trajectory, the technology road map shown in Figure 10 is used.Firstly, a stepping herd trajectory tracking strategy based on the predictive control of the nonlinear model is designed and the active disturbance rejection control (ADRC) based on the indirect iterative learning is used to optimize the trajectory tracking controller.Secondly, the design that considers the consistency protocol including and time delay is proposed to control the UAV to maintain the boundary of the herd so as to form the enclosure of the herd.At the same time, the speed avoidance algorithm is adopted to prevent collisions between the UAVs.Finally, a single-machine spiral half-encircling guidance strategy is designed to guide the stragglers into the group.The goal of path optimization is to find the shortest and optimal path to meet the movement conditions of the UAV.First, the grid of all edible grazing areas in the grazing area are passed just once and the sheep stay there for a while during the course of a week.Second, it is set that higher priority grid pasture areas within a pastoral area must be visited and stayed in before lower priority grid pasture areas.That is, before visiting the pasture grid area with a lower priority in the pastoral area, it is necessary to ensure that other task grid areas with a higher priority have been accessed.A mathematical description of the path optimization problem of the UAV can be obtained.This means that the two-layer optimization objective function requires the shortest path length in the whole cycle and the shortest path length in each day of the cycle [85].Therefore, the objective function can be established according to the task area of the pastoral area carried out by the UAV.For the selection of path optimization algorithm, there are some meta-heuristic algorithms such as sparrow search algorithm (SSA) [86], condor optimization algorithm [87], bat optimization algorithm [88] and so on.

The Tracking and Encircling Control of the UAV Formation
When the UAV formation is used to control and track the preset trajectory, the technology road map shown in Figure 10 is used.Firstly, a stepping herd trajectory tracking strategy based on the predictive control of the nonlinear model is designed and the active disturbance rejection control (ADRC) based on the indirect iterative learning is used to optimize the trajectory tracking controller.Secondly, the design that considers the consistency protocol including time-varying and time delay is proposed to control the UAV to maintain the boundary of the herd so as to form the enclosure of the herd.At the same time, the speed avoidance collision algorithm is adopted to prevent collisions between the UAVs.Finally, a single-machine spiral half-encircling guidance strategy is designed to guide the stragglers into the group.

The current position of the leader
The herd boundary location

The current location of stragglers
The The UAV is generally regarded as a second-order integral dynamic system, but this system only simply considers the constant course motion of UAV in a two-dimensional plane, and the final result makes the position and speed information of UAV tend to be consistent.The actual UAVs movement in three-dimensional space is much more complex, including the change in course and altitude.And the convergence of the position to the The UAV is generally regarded as a second-order integral dynamic system, but this system only simply considers the constant course motion of UAV in a two-dimensional plane, and the final result makes the position and speed information of UAV tend to be consistent.The actual UAVs movement in three-dimensional space is much more complex, including the change in course and altitude.And the convergence of the position to the same value will cause the UAV to crash, which is a very serious accident.Therefore, a more Drones 2023, 7, 542 20 of 29 accurate UAV model is needed.The intelligent grazing development strategy often adopts the UAV model based on autopilot, which decoupled the UAV into horizontal, lateral and longitudinal movements.And the formation should be clearly described before designing the control law.The edge-edge method proposed by Desai is widely used to describe the formation at present.The formation is described by the relative distance between the position of the UAV and the reference point in the formation.When the tracking strategy of the herd track is designed, if there is a leader in the herd, the UAV is assigned to attract the leader to track the planned path, so that the orientation of the herd is clear, and the rest of the UAVs are located at the left, right and tail of the herd.If there is not a leader in the herd, the herd is surrounded with the UAVs in the front, back, left and right directions.The algorithm of the Nonlinear Model Predictive Control (NMPC) is used to make the UAV formation move according to the preset trajectory and surround the herd at all times during the movement process, so that the herd also moves according to the preset trajectory.As shown in Figure 11, the yellow rectangle border represents the boundary of the herd.Since the UAVs are too close to the herd, the herd will be disturbed, so a certain threshold value that is set as d should be set.The boundary formed by the UAV formation during the flight should not be smaller than the black dotted line.The UAV is on the blue real line at time t, the center of the UAV formation is in the position ξ(t).According to the prediction of trajectory tracking controller, the center of the UAV formation is located at position ξ(t + 1) at time t + 1.
Drones 2023, 7, x 21 of 31 same value will cause the UAV to crash, which is a serious accident.Therefore, a more accurate UAV model is needed.The intelligent grazing development strategy often adopts the UAV model based on autopilot, which decoupled the UAV into horizontal, lateral and longitudinal movements.And the formation should be clearly described before designing the control law.The edge-edge method proposed by Desai is widely used to describe the formation at present.The formation is described by the relative distance between the position of the UAV and the reference point in the formation.When the tracking strategy of the herd track is designed, if there is a leader in the herd, the UAV is assigned to attract the leader to track the planned path, so that the orientation of the herd is clear, and the rest of the UAVs are located at the left, right and tail of the herd.If there is not a leader in the herd, the herd is surrounded with the UAVs in the front, back, left and right directions.The algorithm of the Nonlinear Model Predictive Control (NMPC) is used to make the UAV formation move according to the preset trajectory and surround the herd at all times during the movement process, so that the herd also moves according to the preset trajectory.As shown in Figure 11, the yellow rectangle border represents the boundary of the herd.Since the UAVs are too close to the herd, the herd will be disturbed, so a certain threshold value that is set as d should be set.The boundary formed by the UAV formation during the flight should not be smaller than the black dotted line.The UAV is on the blue real line at time t, the center of the UAV formation is in the position ( ) t  .According to the prediction of trajectory tracking control- ler, the center of the UAV formation is located at position ( ) When a UAV is guided to move quickly and attract key individuals, salt blocks and other attractions should be hung below to guide the key individuals.At the same time, there is a lot of northwest wind in the grassland of Inner Mongolia of China, and the wind level can reach level 3-6.The wind speed is high in spring and winter, and the average wind speed is 4.5 m/s.The wind speed is relatively low in autumn and summer, and the average wind speed is 3.3 m/s.In addition, the wind speed increases with the increase in terrain height, and the flying altitude of the UAVs is 3-4 m.Therefore, the unmeasured characteristics such as wind disturbance, which combines with the irregular swing of the suspension load, may cause the UAVs to deviate from the course or fall unsteadily.In order to ensure that the UAVs can be guided to fly stably in accordance with the established route under different disturbances, the guidance control law based on the ADRC a UAV is guided to move quickly and attract key individuals, salt blocks and other attractions should be hung below to guide the key individuals.At the same time, there is a lot of northwest wind in the grassland of Inner Mongolia of China, and the wind level can reach level 3-6.The wind speed is high in spring and winter, and the average wind speed is 4.5 m/s.The wind speed is relatively low in autumn and summer, and the average wind speed is 3.3 m/s.In addition, the wind speed increases with the increase in terrain height, and the flying altitude of the UAVs is 3-4 m.Therefore, the unmeasured characteristics such as wind disturbance, which combines with the irregular swing of the suspension load, may cause the UAVs to deviate from the course or fall unsteadily.In order to ensure that the UAVs can be guided to fly stably in accordance with the established route under different disturbances, the guidance control law based on the ADRC and indirect iterative learning is proposed to control the UAVs to guide the key individuals to move to a given region under the compound disturbance.
As shown in Figure 12, when a UAV hangs an attractor such as a salt block, it may deviate from the course or fall due to the influence of irregular suspension load disturbance, wind speed, etc.In addition, it is difficult to establish an accurate model for irregular suspension load disturbance, so it is planned to conduct disturbance rejection design as unknown disturbance.
Drones 2023, 7, x 22 of 31 and indirect iterative learning is proposed to control the UAVs to guide the key individuals to move to a given region under the compound disturbance.As shown in Figure 12, when a UAV hangs an attractor such as a salt block, it may deviate from the course or fall due to the influence of irregular suspension load disturbance, wind speed, etc.In addition, it is difficult to establish an accurate model for irregular suspension load disturbance, so it is planned to conduct disturbance rejection design as unknown disturbance.As shown in Figure 12, the UAV of the quadrotor has four propellers, which are symmetrically distributed in a cross type.The power obtained by the UAV is generated by the rotation of the four propellers, and the flight state is controlled by the lift difference generated by the four rotors.The schematic diagram of the cross-type quadrotor is shown in Figure 13.The origin of coordinates is the UAV center of gravity, X-axis is the UAV center of gravity pointing to the direction of the nose, Y-axis is the UAV center of gravity pointing to the left, Z-axis is the UAV center of gravity pointing to the top of the UAV according to the right-hand rule.When the lift is generated, the speed of four rotors is increased at the same time to achieve going up or falling down.Differential is used to change the speeds of 1, 3 and 2, 4 to produce reverse torque and achieve the yaw about the Z axis.At the same time, the differential is used to change the speeds of 2, 3 and 1, 4 to make the body roll about the X-axis and move along the Y-axis to achieve the rolling motion.When the differential is used to change the speeds of 1,2 and 3,4, the body is made to roll about the Y-axis and move along the X-axis to achieve the pitch motion.As shown in Figure 12, the UAV of the quadrotor has four propellers, which are symmetrically distributed in a cross type.The power obtained by the UAV is generated by the rotation of the four propellers, and the flight state is controlled by the lift difference generated by the four rotors.The schematic diagram of the cross-type quadrotor is shown in Figure 13.The origin of coordinates is the UAV center of gravity, X-axis is the UAV center of gravity pointing to the direction of the nose, Y-axis is the UAV center of gravity pointing to the left, Z-axis is the UAV center of gravity pointing to the top of the UAV according to the right-hand rule.When the lift is generated, the speed of four rotors is increased at the same time to achieve going up or falling down.Differential is used to change the speeds of 1, 3 and 2, 4 to produce reverse torque and achieve the yaw about the Z axis.At the same time, the differential is used to change the speeds of 2, 3 and 1, 4 to make the body roll about the X-axis and move along the Y-axis to achieve the rolling motion.When the differential is used to change the speeds of 1,2 and 3,4, the body is made to roll about the Y-axis and move along the X-axis to achieve the pitch motion.and indirect iterative learning is proposed to control the UAVs to guide the key individuals to move to a given region under the compound disturbance.As shown in Figure 12, when a UAV hangs an attractor such as a salt block, it may deviate from the course or fall due to the influence of irregular suspension load disturbance, wind speed, etc.In addition, it is difficult to establish an accurate model for irregular suspension load disturbance, so it is planned to conduct disturbance rejection design as unknown disturbance.As shown in Figure 12, the UAV of the quadrotor has four propellers, which are symmetrically distributed in a cross type.The power obtained by the UAV is generated by the rotation of the four propellers, and the flight state is controlled by the lift difference generated by the four rotors.The schematic diagram of the cross-type quadrotor is shown in Figure 13.The origin of coordinates is the UAV center of gravity, X-axis is the UAV center of gravity pointing to the direction of the nose, Y-axis is the UAV center of gravity pointing to the left, Z-axis is the UAV center of gravity pointing to the top of the UAV according to the right-hand rule.When the lift is generated, the speed of four rotors is increased at the same time to achieve going up or falling down.Differential is used to change the speeds of 1, 3 and 2, 4 to produce reverse torque and achieve the yaw about the Z axis.At the same time, the differential is used to change the speeds of 2, 3 and 1, 4 to make the body roll about the X-axis and move along the Y-axis to achieve the rolling motion.When the differential is used to change the speeds of 1,2 and 3,4, the body is made to roll about the Y-axis and move along the X-axis to achieve the pitch motion.Among them, ϕ, θ, φ are the roll angle, pitch angle, and yaw angle, respectively.The attitude loop control of the UAV is taken as an example.The design points of the anti-disturbance control law of ADRC are based on indirect iterative learning, the unknown internal disturbance of the system and the wind disturbance and load disturbance outside the system is added to the control channels ϕ, θ, φ, respectively.
In the ADRC control, the tracking differentiator (TD) is used to realize the arrangement of the system transition process and obtain the tracking signal and a series of differential signals of the control signal, which play the role of filtering and reducing the initial error.The extended state observer (ESO) estimates the system disturbances, the state variables of the feedback system and the disturbance observations.The nonlinear state error feedback (NLSEF) adopts the idea of eliminating errors based on the errors and constructs nonlinear error feedback law with high efficiency.In addition, the larger the bandwidth of ADRC is, the stronger the ability of the output of the system to follow the input command is, and the better is the dynamic performance of the system.The larger the bandwidth is, the greater the compensation to the control quantity is, that is, the larger is the compensation estimate of the control quantity, which is called the high-gain state observer.However, when the external disturbance is small, using too large a bandwidth will cause the chattering output of the control quantity to be very large.It is necessary to construct adaptive ADRC by selecting the appropriate bandwidth.Under conditions of large error and disturbance, the large bandwidth should be selected.Under small error and disturbance, the small bandwidth should be selected.The iterative control is proposed to update the ADRC bandwidth in real time according to the error.The ADRC real-time adaptive attitude control under the different disturbances is realized.
The iterative learning control is a new learning control technology combining artificial intelligence and the automatic control.The iterative learning control has the learning process and characteristics of personification, and the method of step by step and learning by doing is simulated by humans, which is widely applicable to the uncertain and uncertain nonlinear complex system.The flow diagram of iterative learning control algorithm is shown in Figure 14.
Among them, ,,    are the roll angle, pitch angle, and yaw angle, respectively.
The attitude loop control of the UAV is taken as an example.The design points of the antidisturbance control law of ADRC are based on indirect iterative learning, the unknown internal disturbance of the system and the wind disturbance and load disturbance outside the system is added to the control channels ,,    , respectively.
In the ADRC control, the tracking differentiator (TD) is used to realize the arrangement of the system transition process and obtain the tracking signal and a series of differential signals of the control signal, which play the role of filtering and reducing the initial error.The extended state observer (ESO) estimates the system disturbances, the state variables of the feedback system and the disturbance observations.The nonlinear state error feedback (NLSEF) adopts the idea of eliminating errors based on the errors and constructs nonlinear error feedback law with high efficiency.In addition, the larger the bandwidth of ADRC is, the stronger the ability of the output of the system to follow the input command is, and the better is the dynamic performance of the system.The larger the bandwidth is, the greater the compensation to the control quantity is, that is, the larger is the compensation estimate of the control quantity, which is called the high-gain state observer.However, when the external disturbance is small, using too large a bandwidth will cause the chattering output of the control quantity to be very large.It is necessary to construct adaptive ADRC by selecting the appropriate bandwidth.Under conditions of large error and disturbance, the large bandwidth should be selected.Under small error and disturbance, the small bandwidth should be selected.The iterative control is proposed to update the ADRC bandwidth in real time according to the error.The ADRC real-time adaptive attitude control under the different disturbances is realized.
The iterative learning control is a new learning control technology combining artificial intelligence and the automatic control.The iterative learning control has the learning process and characteristics of personification, and the method of step by step and learning by doing is simulated by humans, which is widely applicable to the uncertain and uncertain nonlinear complex system.The flow diagram of iterative learning control algorithm is shown in Figure 14.In the process of the iterative learning algorithm, U k (t) is the current control quantity.e k (t) is the current output error.The output y k (t) is a vector function of the state vector.K, K−1, and K+1 represent the current phase, the previous phase, and the next phase, respectively.The current control quantity U k (t) and output error e k (t) constitute the learning law, and the control quantity U k+1 (t) in the next iteration is generated.Because the disturbance rejection control of quadrotor UAV requires short adjustment time, the PD learning law is adopted.
At present, iterative learning control mainly discusses the control effect by changing the input, and the parameters of the controller are not modified, which is also known as static controller.In other words, the parameters of the controller will not change during the control process.Indirect iterative learning control means that the system has a basic feedback controller, and the learning control is used to update and optimize the parameters of the local controller, it is also called dynamic controller, that is, the controller will change with the change in iteration.
The indirect iterative control achieves an optimal performance index through online automatic adjustment of the controller when the control object is subject to unknown or unpredictable input.Indirect iterative learning control realizes the adaptive construction of ADRC by online adjusting the bandwidth ω 0 of the extended state observer in ADRC.The pitching channel control system is shown in Figure 15.In the figure, the adaptive ADRC is divided into ADRC and indirect ILC controller.The input is the expected pitching angle, assuming that the hovering pitching angle is 0 degrees, and the output is the control quantity for the UAV's pitching channel.The actual pitching angle of the feedback of the UAV is fed to the ADRC and indirect ILC controller.The indirect ILC controller is based on the pitching angle error e k−1 (t) at k−1 time of the previous stage and the output control quantity U k−1 at the previous stage.The control quantity U k outputted via the PD learning law is the bandwidth ω 0 of the ADRC expansion state observation at this time.The ADRC controller combined with ILC outputs the bandwidth, according to the pitching angle error, the UAV pitching channel control quantity U 3 is outputted.Therefore, the adaptive ADRC control law of pitching channel constructed via adjusting ADRC bandwidth using indirect iterative learning is U 3 .At this point, the anti-disturbance control law of the ADRC based on indirect iterative learning control of pitching channel is designed [89].Similarly, the design method can be extended to the UAV position loop and attitude loop to control other state quantities.
the input, and the parameters of the controller are not modified, which is also known as static controller.In other words, the parameters of the controller will not change during the control process.Indirect iterative learning control means that the system has a basic feedback controller, and the learning control is used to update and optimize the parameters of the local controller, it is also called dynamic controller, that is, the controller will change with the change in iteration.
The indirect iterative control achieves an optimal performance index through online automatic adjustment of the controller when the control object is subject to unknown or unpredictable input.Indirect iterative learning control realizes the adaptive construction of ADRC by online adjusting the bandwidth 0  of the extended state observer in ADRC.
The pitching channel control system is shown in Figure 15.In the figure, the adaptive ADRC is divided into ADRC and indirect ILC controller.The input is the expected pitching angle, assuming that the hovering pitching angle is 0 degrees, and the output is the control quantity for the UAV's pitching channel.The actual pitching angle of the feedback of the UAV is fed to the ADRC and indirect ILC controller.The indirect ILC controller is based on the pitching angle error    The intelligent grazing development strategy uses a distributed consensus protocol to control the speed, heading and climbing height of the UAVs to ensure that the UAV formation surrounds the herd at all times.According to the model and control quantity in Section 4.4.1, a set of consistent comprehensive protocols is designed, and the UAVs' formation is determined according to the herd boundary.However, when the formation surrounds the herd, the system will inevitably have time-varying and time delay due to the change in formation scale and internal delay.Therefore, considering the time-varying and time delay in the system into the protocol, three directions of the UAVs can be designed.The three direction controllers are used to control the speed, heading and climbing speed of the UAVs, and a consistent control protocol with time delay is obtained.The speed collision avoidance algorithm is used to solve the obstacle avoidance problem between UAVs in multi-aircraft cooperative formation.In the speed collision avoidance algorithm, each UAV works independently and does not connect with other UAVs, which reduces the communication difficulty.It is supposed that two drones A and B obtain their position and the radius of the drone, respectively.And a speed obstacle algorithm is designed to represent the speed set of all the collisions between A and B in a certain time t.The velocity obstacle avoidance is a truncated circular cone, and the amount of truncation depends on the value of t.That means that after t seconds, UAV A will be in the same position as UAV B. Therefore, all speeds in the speed obstacle avoidance zone will result in a collision after t seconds when the distance between UAV A and UAV B is less than their common radius.In order to avoid collision, the relative velocity must be added with the change vector U, so that the added relative velocity is outside the speed obstacle area.At this point, the end point of U is divided into two situations, as shown in Figure 16.One is that the closest point to the relative velocity is on the support foot of the truncated cone, and the other is on the arc of the truncated circular cone.
The three direction controllers are used to control the speed, heading and climbing spe of the UAVs, and a consistent control protocol with time delay is obtained.The speed c lision avoidance algorithm is used to solve the obstacle avoidance problem between UA in multi-aircraft cooperative formation.In the speed collision avoidance algorithm, ea UAV works independently and does not connect with other UAVs, which reduces communication difficulty.It is supposed that two drones A and B obtain their posit and the radius of the drone, respectively.And a speed obstacle algorithm is designed represent the speed set of all the collisions between A and B in a certain time t.The veloc obstacle avoidance is a truncated circular cone, and the amount of truncation depends the value of t.That means that after t seconds, UAV A will be in the same position as U B. Therefore, all speeds in the speed obstacle avoidance zone will result in a collision af t seconds when the distance between UAV A and UAV B is less than their common radi In order to avoid collision, the relative velocity must be added with the change vector so that the added relative velocity is outside the speed obstacle area.At this point, the e point of U is divided into two situations, as shown in Figure 16.One is that the clos point to the relative velocity is on the support foot of the truncated cone, and the othe on the arc of the truncated circular cone.Because the UAVs all use the same obstacle avoidance algorithm, the velocity barr area of A with respect to B and B with respect to A is symmetric about the origin.The fore, the speed increments assigned to UAV A and UAV B should be equal and oppos When half of the velocity increment U is added to UAV A's current velocity, a line drawn perpendicular to U at this time.Now, the allowed velocity is defined as the ha plane of velocity on one side of the line in the positive direction U.The UAV B's spe increment is added in a similar way.This speed increment region is defined as the optim collision avoidance region.When there are multiple UAVs, UAV A plans a speed inc ment region for each UAV B and finds out its intersection, then this intersection is Because the UAVs all use the same obstacle avoidance algorithm, the velocity barrier area of A with respect to B and B with respect to A is symmetric about the origin.Therefore, the speed increments assigned to UAV A and UAV B should be equal and opposite.When half of the velocity increment U is added to UAV A's current velocity, a line is drawn perpendicular to U at this time.Now, the allowed velocity is defined as the half-plane of velocity on one side of the line in the positive direction U.The UAV B's speed increment is added in a similar way.This speed increment region is defined as the optimal collision avoidance region.When there are multiple UAVs, UAV A plans a speed increment region for each UAV B and finds out its intersection, then this intersection is the speed set that UAV A can choose to avoid collision with other UAVs.The linear programming algorithm is used to find the velocity vector and it is set as the new velocity.If there is no speed zone, a collision is inevitable, so the speed that is most likely to be safe is selected, even if there is the least chance of collision damage.In the geometry, the new velocity can be interpreted as moving all half planes at the same speed until a valid velocity is found.Similarly, linear programming algorithms can be used to calculate the speed of the updated UAVs.

The Regrouping Strategy of the Stragglers
After the redundant UAV uses the guidance law method to find the straggling individual, the leader UAV gives the coordinates of the straggling individual and the redundant UAV coordinates.In general, at least three UAVs are required to surround the stragglers and guide them back to the group.That is, the UAVs are distributed on the left and right wings and tail of the stragglers to drive them close to the herd.This method will undoubtedly increase the cost of herdsmen and increase the failure rate, so it is not practical.Inspired by the solitary shepherd dog, a UAV is used to guide the straggling individuals into the group by using a spiral semi-encircling guidance strategy to achieve the effect of multiple UAVs driving together.First, the position of the redundant UAV is obtained in real time by using the leader UAV.As shown in Figure 17, the position of the stragglers at time t is p s (t), the herd boundary is a yellow box and the virtual center ξ(t) of the UAV formation is a red dot in the yellow box.The position of the virtual center point of the formation at the next moment predicted by the trajectory tracking controller is ξ(t + 1).This point is connected to the straggler and the redundant drone is driven to an extension line Pb from the straggler.The surrounding points (brown solid circles in Figure 17) behind the stragglers are formed, and these points are constantly refreshed to interact with the stragglers, so that the stragglers can correct their traveling direction, and finally they are driven into the group.Since individuals are cognitively capable of the group, they are driven closer to the herd to ensure that the individual is automatically integrated into the group.When the leader UAV detects that the straggling individual has entered the herd boundary, the redundant UAV will no longer drive it away, and forms a communication topology with neighboring UAVs to join the UAV formation.
undoubtedly increase the cost of herdsmen and increase the failure rate, so it is not practical.Inspired by the solitary shepherd dog, a UAV is used to guide the straggling individuals into the group by using a spiral semi-encircling guidance strategy to achieve the effect of multiple UAVs driving together.First, the position of the redundant UAV is obtained in real time by using the leader UAV.As shown in Figure 17, the position of the stragglers at time t is ( ) s pt, the herd boundary is a yellow box and the virtual center ( ) t  of the UAV formation is a red dot in the yellow box.The position of the virtual center point of the formation at the next moment predicted by the trajectory tracking controller is ( ) 1 t  + .This point is connected to the straggler and the redundant drone is driven to an extension line Pb from the straggler.The surrounding points (brown solid circles in Figure 17) behind the stragglers are formed, and these points are constantly refreshed to interact with the stragglers, so that the stragglers can correct their traveling direction, and finally they are driven into the group.Since individuals are cognitively capable of the group, they are driven closer to the herd to ensure that the individual is automatically integrated into the group.When the leader UAV detects that the straggling individual has entered the herd boundary, the redundant UAV will no longer drive it away, and forms a communication topology with neighboring UAVs to join the UAV formation.

Conclusions
"Remote sensing, herd perception, guidance and control" is the main pipeline of the intelligent grazing strategy.Firstly, the pasture remote sensing provides the information of the grade of pasture in a pastoral area based on the height of the canopy and spectral characteristics of the vegetation, and the training set is obtained for biomass information, the grade of pasture in pastoral area is provided by few-shot model.Secondly, the remote sensing information of herds, the multi-source data-driven scene segmentation and hybrid-driven target-tracking algorithm are used to realize the detection of flexible herds' boundaries, stragglers and leaders' positions, and the hybrid-driven guidance law is used to guide the redundant UAV to track the leader sheep and the stragglers quickly.At the same time, wearable equipment is used for individual behavior recognition and infrared health monitoring based on the deep learning method for a single individual sheep.Thirdly, combined with the perceptual monitoring of the dynamic counting of sheep and the appropriate grazing capacity, the periodic grazing scheme is determined, and the optimal periodic grazing path is obtained by using the environment model, the path constraint model and the heuristic search algorithm (sparrow search algorithm).Finally, according to the periodic grazing trajectory, leader position and herd boundary position, the stepby-step herd trajectory tracking strategy is adopted.At the same time, the ADRC-based indirect iterative learning is used to optimize the trajectory tracking control, to prevent the disturbance from becoming too large and crashing the aircraft.Finally, the unmanned aircraft constrains the herd to travel along the trajectory; at the same time, redundant unmanned aerial vehicles are used to realize the control strategy of single machine spiral half encirclement guidance for stragglers, to guide stragglers to group, thus forming a complete closed-loop intelligent grazing system.To sum up, the proposed intelligent UAV

Figure 1 .
Figure 1.The schematic diagram of UAV carrying a salt brick to attract sheep to move in the planned direction.

Figure 1 .
Figure 1.The schematic diagram of UAV carrying a salt brick to attract sheep to move in the planned direction.

Drones 2023, 7 , x 11 of 31 Figure 2 .
Figure 2. The closed loop thinking frame of the intelligent grazing.

4. 1 . 1 .
The Inversion Model of the Vegetation Biomass and the Chlorophyll Content in the Pastoral Area

Figure 2 .
Figure 2. The closed loop thinking frame of the intelligent grazing.

4 .
Key Technologies of the Intelligent Grazing 4.1.The Remote Sensing of the Feeding Area Using the Sensing UAV to Solve the Perception Problem of Grazing Area and the Evaluation Technique of the Pasture Grade

Figure 3 .
Figure 3.The fusion of MAML and the supervised learning algorithm.

Figure 3 .
Figure 3.The fusion of MAML and the supervised learning algorithm.

Figure 4 .
Figure 4.The technology road map of the integrated herd monitoring: (a) The dataset of the RGB three-channel high-resolution image of the herds; (b) the high-resolution thermal infrared image data of the herds.

Figure 4 .Figure 5 .
Figure 4.The technology road map of the integrated herd monitoring: (a) The dataset of the RGB three-channel high-resolution image of the herds; (b) the high-resolution thermal infrared image data of the herds.At the present stage, the main direction of scene segmentation algorithm is based on the FCN network, and the segmentation weight of the original image is reasonably planned to avoid network training falling into local optimal.The scene segmentation algorithm that is shown in Figure5adopted by the intelligent grazing strategy introduced high-resolution thermal infrared images of the herd to suppress the noise and prevent the model from falling into local optimum with the idea of multi-source sensor fusion.Meanwhile, the attention mechanism is added to improve the accuracy.Drones 2023, 7, x 15 of 31

Figure 5 .
Figure 5.The technology road map of the scene segmentation algorithm based on multi-source data.
Drones 2023, 7, x 16 of 31 intelligent grazing strategy, it is planned to build low-cost wearable devices based on a combination of cameras and microphones, with eye-catching color features such as straps and other markers, to record sheep's first-view video data and sheep's voice data.The wearable device is fastened between the horns of the sheep's head by means of fasteners such as straps with special color markings.The special color marker is designed to identify the RGB three-channel herd image data from the top view of the UAV and a spatial position connection is established with the UAV.The position information of sheep with wearable devices is also obtained in the top view.Taking the effective sound collection range of the microphone module and the acquisition range of the first-view camera image as the boundary, the individual behavior of sheep in this area can be effectively monitored and identified.The schematic diagram of the wearable device is shown in Figure 6.

Figure 6 .
Figure 6.The schematic diagram of the elements of the wearable devices."The herd effect" is the conformity that is a very important characteristic of individual sheep in herds.The first perspective of sheep is usually towards the herd or towards the direction of more sheep, which means, "grouping" in group behavior.It can provide rich information for individual behavior identification and cognition of sheep.The field of view from the first perspective has a certain monitoring effect on the herd, and with special markers, the position of the sheep with markers can be easily deduced from the

Figure 6 .
Figure 6.The schematic diagram of the elements of the wearable devices.

Figure 7 .
Figure 7.The typical feeding behavior of the sheep from the first view: (a) The feeding behavior of the sheep without wearing wearable devices; (b) the feeding behavior of the sheep wearing wearable devices.

Figure 7 .
Figure 7.The typical feeding behavior of the sheep from the first view: (a) The feeding behavior of the sheep without wearing wearable devices; (b) the feeding behavior of the sheep wearing wearable devices.

Drones 2023, 7 , x 18 of 31 Figure 8 .
Figure 8.The data-driven method for obtaining the current and predicted location of the target.

Figure 8 .
Figure 8.The data-driven method for obtaining the current and predicted location of the target.

Figure 9 .
Figure 9.The grid pastoral area of the grade classification.

Figure 9 .
Figure 9.The grid pastoral area of the grade classification.

Figure 10 .
Figure 10.The technology road map of the tracking and encircling control of the UAV formation.

Figure 10 .
Figure 10.The technology road map of the tracking and encircling control of the UAV formation.

4. 4 . 1 .
The Trajectory Tracking Control of the Herd Based on the Active Disturbance Rejection Control and Indirect Iterative Learning

4. 4 . 1 .
The Trajectory Tracking Control of the Herd Based on the Active Disturbance Rejection Control and Indirect Iterative Learning

Figure 11 .
Figure 11.The schematic diagram of the stepping trajectory tracking.

Figure 11 .
Figure 11.The schematic diagram of the stepping trajectory tracking.

Figure 12 .
Figure 12.The disturbance schematic diagram of the irregular suspension load.

4 F 1 F 3 F 2 FOFigure 13 .
Figure 13.The definition of the coordinate system and the force diagram for the quadcopter UAV.

Figure 12 .
Figure 12.The disturbance schematic diagram of the irregular suspension load.

Figure 12 .
Figure 12.The disturbance schematic diagram of the irregular suspension load.

4 F 1 F 3 F 2 FOFigure 13 .
Figure 13.The definition of the coordinate system and the force diagram for the quadcopter UAV.Figure 13.The definition of the coordinate system and the force diagram for the quadcopter UAV.

Figure 13 .
Figure 13.The definition of the coordinate system and the force diagram for the quadcopter UAV.Figure 13.The definition of the coordinate system and the force diagram for the quadcopter UAV.

Figure 14 .Figure 14 .
Figure 14.The flow diagram of the iterative learning control algorithm.

 3 U
1 time of the previous stage and the output control quantity 1 k U − at the previous stage.The control quantity k U outputted via the PD learning law is the bandwidth 0 of the ADRC expansion state observation at this time.The ADRC controller combined with ILC outputs the bandwidth, according to the pitching angle error, the UAV pitching channel control quantity is outputted.There- fore, the adaptive ADRC control law of pitching channel constructed via adjusting ADRC bandwidth using indirect iterative learning is3U .At this point, the anti-disturbance con- trol law of the ADRC based on indirect iterative learning control of pitching channel is designed[89].Similarly, the design method can be extended to the UAV position loop and attitude loop to control other state quantities.

Figure 15 .
Figure 15.The ADRC attitude controller based on the indirect iterative learning control for the pitching channel.

Figure 15 .
Figure 15.The ADRC attitude controller based on the indirect iterative learning control for the pitching channel.

4. 4 . 2 .
The Consensus Protocol of the Time-Varying Formation and the Obstacle Avoidance Algorithm Design for the Multi-Machine Cooperative Formation

Figure 16 .
Figure 16.The schematic diagram of the relative velocity and its corresponding variable U: (a) T nearest point to the relative velocity is on the foot of the truncated circular cone; (b) the nearest po to the relative velocity is in the arc of the truncated circular cone.

Figure 16 .
Figure 16.The schematic diagram of the relative velocity and its corresponding variable U: (a) The nearest point to the relative velocity is on the foot of the truncated circular cone; (b) the nearest point to the relative velocity is in the arc of the truncated circular cone.

Figure 17 .Figure 17 .
Figure 17.The schematic diagram of the spiral semi-encircling guidance strategy.