Aggregate Farming in the Cloud: The AFarCloud ECSEL project

big data and real-time data mining


Introduction
Our societies are facing tremendous challenges in order to build a sustainable future across different regions of the globe. Population increase, an increasingly degraded environment, changing in food preferences, e.g. increased consumption of animal proteins, aging population and migration, and of course climate change [1]. Precision farming, including automation, has already established paradigms in order to increase farm productivity, quality, and improve working conditions, through reduced manual labor. There improvements help also to make farming become sustainable.
Examples of high-tech solutions in farming are evident, e.g. (semi-) autonomous solutions for (i) grafting to seeding and planting, (ii) monitoring and harvesting to sorting, (iii) packaging and boxing, and (iv) livestock management and animal welfare. The drawbacks of these approaches are that, firstly, they are calibrated only for a specific task, without the ability to be integrated in a more complex service to provide a holistic solution. Secondly, there is a lack of interoperability which causes additional work for the users, as they must manually feed the output data from one system into the next. The AFarCloud (Aggregate Farming in the Cloud) project assumes that, these two factors are preventing the uptake of the advanced solutions. Thus, by integrating the different technologies and services, such as software components, legacy vehicles, modern Unmanned Ground Vehicles (UGV), and Unmanned Aerial Vehicles (UAV), and other equipment through a middleware solution with a common information model and application interface this project aims at meet the challenges of future farming as described above. Improvements in these directions will also reduce the footprint of the farming sector, thus have a positive impact on the environment. Note that, farming adds nitrogen and phosphorus to terrestrial ecosystems [2,3]. These chemicals present an occupational threat extending to farm workers, their families and potentially to inhabitants of areas exposed to their application on crops, on vineyards etc. Index of risk of damage from pesticide toxicity and exposure can be determined [4,5] and, through autonomous precision farming, these effects can be mitigated as chemicals such as fertilizer and pesticides are only administered where needed instead of applied over a large area. Lastly, there are several aspects of precision farming that will reduce energy consumption in farming. One way of doing this is using multiple light autonomous vehicles instead of a few heavy tractors, thus reducing soil compaction, which again reduces the energy needed for tilling the soil. Additionally, CO 2 -emissions will be reduced as the use of electric ground vehicles and UAVs partially replace large fossil fuel-based vehicles.
The AFarCloud project has started on September 1st, 2018 and its duration is three years. In the following, we highlight project goals, explain selected approach, describe application domains, and discuss main implementation issues.

The AFarCloud solution
As reported in the Scientific and Technological Options Assessment (STOA) Study of European Parliament, precision farming technologies allow the production of 'more with less'. The use of natural resources, agrochemicals, antibiotics and energy will be reduced to the benefit of both farmers and the environment, and in turn society, with the above described factors. In this regard, the AFarCloud project assumes the urgent need of a holistic and systematic approach, through smart sustainable and digital automated production. According to this view precision farming needs to consider orchestration of different application capabilities like data collection and cloud computing, a sensing-on-themove approach, cyber physical systems (CPS) management, IoT sensing and actuation, decision support systems, autonomous vehicles (UAVs/ UGVs) for most aspects of agricultural processes. These solutions aim at realizing Farming-as-a-Service (FaaS), thus assuming a novel holistic view, in which everything is tightly connected with the optimization of production, energy, water, food quality and services.
Taken together, the AFarCloud project will contribute to: • Enhance the applications of Cyber-Physical Systems in the farming domain • Improve the autonomy and cooperation of farming CPS solutions • Increase the interoperability, cooperation, and reuse of CPS and autonomous vehicles achieving a better level of reduction of human labor • Enable reliable, high-performance, real-time and secure data exchange for CPS. Guaranteeing the exchange of data in real-time is a critical safety requirement for systems that operate with autonomous vehicles. In addition, obtaining measurements in real-time is essential both in the monitoring of crops, in order to detect as quickly as possible harmful conditions for crops, such as ice or frost, as well as in the monitoring of livestock, to react quickly to any change in the health of animals, such as diseases or a calving • Environmental benefits and reduction of agrochemicals in farming activities, contribution to biodiversity protection as well, by adopting eco-friendly agronomic protocols that AFarCloud technology will support in order to calibrate them effectively in real-time monitoring • Optimization of resources used in agriculture and better approach for pesticide-free food production. Benefits for farm workers and people living in surrounding areas of the farm will be achieved, related to the reduction of agrochemicals • Generate a direct impact and innovation in the EU farming and mechatronics industry, by providing new standards in the UAV and UGV industry, in order to demonstrate and apply a structured and cost-effective approach to the development of new farming solutions Fig. 1 illustrates a global view of the AFarCloud system. Measurements and other data from each farm will be collected in the cloud together with external data, for example weather history. Collecting and analyzing data from several farms will give new business opportunities to farmers and other stakeholders in the food supply chain. The semantic middleware will be distributed between vehicles and the management tool. Reliable communication is important as well as to select the correct level of autonomy for the different components in order to obtain robust solutions.

Beyond the state of art -AFarCloud Objectives
The project aims at TRL (Technology Readiness Level) 5, although specific technologies will advance beyond that level. Given the fact that this is a fairly large project with almost 60 partners, clearly, many different challenges beyond the SoA (State of Art) are will be addressed. Thus, there is a great potential for innovation both in the use of already existing technologies and in their combinations to achieve new, more powerful solutions.

Cloud computing and monitoring services
The SoA shows that the whole agricultural sector may benefit from cloud computing, because it can offer a holistic solution not only to collect, process and store data, but also to disseminate those data in the form of information needed to carry out operations on the farm. That information is usually provided as services generated locally or provided by an external service provider. Nowadays, many entities (e.g., governmental agencies, agro-meteorological services, weather services, advisory services such as veterinarians or agriculturists, spraying contractors, logistics providers, distributors, end customers, etc.) provide valuable information that is very useful to carry out the operations of a farm. Given the amount of heterogeneous data sources, service cooperation and information transfer between systems are not trivial at all. A so-called Farm Management System (FMS) has been conceptualize [6]. This software solution acts as an application framework that provides generic functionalities for service providers to offer different services to the end user. The FMS is capable of registering new services into a marketplace where users can discover and use listed services. The FMS architecture is the current framework available for agricultural services such as agrometeorological forecasts. However, the FMS architecture does not address the needs related to managing operations in a farm, e.g. real-time management of agricultural vehicles capable of cooperating. The AFarCloud project can go beyond the outlined SoA in Cloud technology for agriculture, as it is designed to aggregate farming activities and procedures for medium-large scale farms trying to develop a FaaS capable of horizontally integrating farm systems with third-party solutions to cover logistics and production processes. FaaS aim is to provide a turnkey service to reduce repetitive tasks performed by farmers daily. All data retrieved by the Cloud can be very useful to the farmer, to conduct his/her activity and coordinate human activity with the CPS, IoT and vehicles activity.

Adaptive autonomous multi-agent system and decision-support systems
A three-tiered system that bridges cooperation between human and unmanned aerial vehicles (UAV) in identifying threats with autonomous system that have adaptive autonomy has been demonstrated [17]. A policy system that takes the agents' requests for adjusting autonomy in given circumstances and decides whether to override the existing plan has also been proposed [18]. In this solution, the agent has the permission to carry out additional actions instead of the original plan without asking the human operator for permission. In [19] the authors consider adaptive autonomy in terms of meeting real-time requirements in a simulated environment where a human operator and 6 fire engineers have to cooperate whilst sharing resources to extinguish fires. Very interesting is the FP7 project CROPS (Clever Robots for Crops [20]), where highly configurable, modular and clever carrier platform that includes modular parallel manipulators and intelligent tools (sensors, algorithms, sprayers, grippers) that can be easily installed onto the carrier and are capable of adapting to new tasks and conditions. Multi-agent approach and autonomy are the feature of this project.
Alami et al. [21] proposed a solution based on a combination of local individual planning and coordinated decision-making for incremental plan adaptation to the multi-agent context. There are several other solutions to planning that divide the problem into several levels, thus creating a hierarchy of abstractions. However, to our knowledge these solutions are not common in the application domain of this project. The prime reason for this is that in the agriculture domain deployment of (semi)-autonomous multi-agent (robots or vehicles) case is not common. Hierarchy has also been investigated in the context of control systems. In particular, an interesting approach can be found in [22] where the concept of simulation is used to abstract the layers of a hierarchical control system. The methodology is showed to be effective in controlling a mobile ground robot reaching a target in a narrow environment with non-convex obstacles.
Human to machine interface is a quite mature subject in literature and has many different approaches. In [23] it is proposed an automated advising agent approach, in which robot agents in the field assist the human supervisor with their tasks. This approach has been successfully employed in Search and Rescue (SAR) and warehouse operations. To a certain level, these application domains are similar to that of the agricultural domain. Interestingly, there are real products and services on the market that aim at providing support to an operator in the agriculture domain. John Deere's "Precision Ag" service [24] is based on a complete solution for data processing before and after harvesting, planning, as well as advanced visualization. The operator interacts with ordinary agriculture machinery, thus autonomous systems are not part of this solution. Similar commercial solutions can be found elsewhere as well, and today the Cloud and IoT technologies are becoming part of the future solutions [25].

Intermediate layer design (middleware) both for data processing and cyber physical systems
Research in middleware over the past decade has significantly advanced the quality and feature-richness of general-purpose middleware solutions, such as J2EE, .NET, CORBA, and DDS. A middleware serves as the backbone for applications across many domains that have significant social impact, including electronic medical records in health care, air traffic control in transportation and industrial automation, among others. The economic benefits of middleware solutions are significant with up to 50% [7] of time savings in software development reported, thanks to the abstraction level provided. Despite these benefits, a general-purpose middleware poses numerous challenges when developing CPS. First, owing to the stringent demands of CPS on QoS (Quality of Service) (e.g. real-time response in industrial automation) and constraints on resources. There is also the need to be optimized for significant performance gains and energy savings. Second, a general-purpose middleware lacks out of the box support for the modular extensibility of domain-specific and domain-independent features. CPS pose challenges in the design of composable application-specific services that bring safety, security, efficiency and predictability [8]. So, the design of a middleware for CPS must face the design of underlying system and infrastructure to support such services in that heterogeneity. In the agriculture domain, there are a lot of legacy systems that need to be integrated or even reengineered forcing farmers to spend a lot of money to fix everything. The challenge is to make CPS systems interfaceable with the rest of the system services to meet the applications demands, taking into account the retro-compatibility with legacy systems. With the aim of introducing CPS approach in Farms [26], an abstraction for the underlying legacy hardware is necessary in AFarCloud project. In particular, the concrete approach is to aggregate farming activities and procedures from middle to large scale users. Therefore, appropriate services for animal or crops farms will be published on the Cloud platform, as an example of that. All the data that can be retrieved by that Cloud platform can be useful to farmers to drive their activity and manage the actions of the different vehicles and IoT cooperating devices in the farm. AFarCloud contains a suitable intermediate layer to model the domain in a semantic way. An ontological intermediate layer will be designed for this issue, that will be able to hide the complexity and heterogeneity of the low-level environment entities deployed such as robot hardware, operating systems, sensors and actuators. Besides, this layer will establish correct communication coordination and appropriate interoperability among all robots and smart objects of the farm. Communication with the existing/deployed types of sensor networks will be based on technologies such as LoRa, SigFox, GSM, WiFi, UWB or Bluetooth. Communication with farm vehicles like UAVs, UGVs or ISOBUS tractors will be based on standards such as DDS (see section 0) and ISOBUS. In summary, we can say that the AFarCloud project is framed into system of systems architecture, having CPS as the real implementation and deployment solution for the agricultural sector, and being compliant with all the desired features of M2M like security, dependability and interoperability between vehicles, robots and sensors devices.

Guarantee reliability in communications between cyber-physical systems
The IIoT (Industrial Internet of Things) focuses strongly on intelligent CPS. In this kind of systems, failure may result in life-threatening situations (e.g. autonomous vehicles). Vast amount of data must be generated and transmitted among devices, sensors and real time systems in order to monitor CPS in real time and ensure safety. The communication software is critical and should not fail (reliability). It also needs to be fast, secure and scalable (scalability). OMG DDS standard [9] is a proven technology for ubiquitous, interoperable, secure, platform independent and real time data sharing across network connected devices. The AFarCloud middleware will be based on the DSS technology to share real-time data across CPS. The main features of DDS are: (1) Real-time data delivery; (2) High-performance, scalable, secure and data-centric publish/subscribe abstraction; (3) Completely decentralized architecture with the dynamic discovery service that automatically establishes communication between matching peers; (4) Rich QoS characteristics for control over every aspect of data distribution, such as data availability, resource usage, reliability, and timing; and (5) Interoperable data sharing, platform-independent extensible modelling, encoding, and representation of data.

Over the state of art -AFarCloud contributions
The contribution of the AFarCloud project will target the three core subdomains of CPS: computation, communication and control. The current state of practice of legacy communication technology is one of the main obstacles [10] of the CPS evolution and its applications. Thus, innovation in communication is restricted with existing routing and switching technologies leaving no practical methods for novel implementation. Software Defined Networking (SDN) decouples network control logic from the underlying physical hardware. This phenomenon allows common distributed programming abstractions to be deployed once and reused across many applications, enabling innovation in next generation communication architectures for CPS. Both the SDN model and the cloud paradigm share a common characteristic, that is they model resources as a service, effectively decoupling the resource provider from the resource consumer. In AFarCloud we have: (1) the devices that collect and receive information; (2) multiple types of networks; (3) the platforms that process and store the information (4) applications that use the information for other purposes. Therefore, a middleware to coordinate and resolve the abstraction of resources and tasks (e.g. Virtualization, Description) is needed.
The concept of FaaS presented in AFarCloud means that the operations of performing a computation (e.g. to control weeds, or irrigation process) must follow a process of abstraction, using a defined interface instead of directly accessing the resources. Therefore, in the proposed solution, there are a set of resources and the possibility to specify a set of relations between them, as well. Consequently, it is possible to define the behavior among resources (in other words the cooperation among them needed to realize a service). The same strategy is also used for abstraction in SDN, or in the LoD (Linked open Data) framework when the resources are well described.
A problem in the domain of precision farming can be described by a set well-defined tasks, which together define a so-called plan. From the user's perspective this plan can be formalized in a high-level, in which different resources, such as legacy vehicles, UGVs, and UAV, as well as other machinery are used. This high-level plan becomes common to the user, or the farmer, and the services that allow orchestration of the CPS. In this abstraction, RDF and other semantic languages can be used to describe resources to be used. This approach decouples services, or programs, from the physical devices (e.g. vehicles, UAVs, and sensors) and it enables network sharing among several devices, from different manufacturers and having very different functionalities, without interference. For example, every resource in the task can be identified as an URI, and services can be invoked using this URIs. It allows to build a common platform for all the applications, with also the features of monitoring, diagnostics, maintenance or dependability, in addition to high-level functionality such machine-machine interaction and collaboration. This helps to implement a semantic middleware in the general platform of AFarCloud. At user level, it is possible to have a web mashup for the monitoring of the state of the tasks or the management of the vehicle fleet.
Communication among CPS units in AFarCloud contributes to bringing technology closer to end-users, which are primarily the farmers or companies that work closely with the farming companies. The benefits of the AFarCloud project can be perceived not only in terms of reduced costs, work times, and improved working conditions, but also farmer gets the most immediately visible results from the cooperation of autonomous or semi-autonomous systems in daily farming and agricultural practices. Thus, not only numbers and theoretical percentage of precision farming benefit, but real and tangible evidence, bringing the farmer and agricultural growers to become more familiarity with technology. The following paragraphs describes the relationship between the AFarCloud STOs (Scientific and Technical Objectives), the progress beyond the SoA and the innovation potential thereby solving AFarCloud Ambitions.

STO 1: Semantic middleware and shared information model
Wireless Sensor Networks (WSNs) are versatile and distributed sensing systems that are conceived to support a wide variety of application domains. Typically, a WSN consists of a large set of sensor nodes, i. e. tiny, low-cost and battery-powered devices with constrained system (energy, computation, memory, and communication) resources that are able to self-organize as an ad-hoc network. Though it is possible to solve simple problems like spatial query the WSN by the means of database's spatial extensions [11], this approach is not feasible to support large application's frequent changes. Resorting on WSNs for supporting applications requires the commitment to develop software applications for such systems. This might be very challenging, especially when exploiting only traditional development platforms. As a consequence, in recent years many efforts have been devoted to investigate the exploitation of middleware solutions as extended platforms for developing WSN applications. In fact, a middleware is a software platform that is intended to hide complexity and heterogeneity of the underlying computing platform and communication network while offering several services to higher layers in a general architecture for application model. For these applications, the sensor readings need to be put in context by integrating them with other sources of data about the surrounding environment. A real application with CPS systems has the need to integrate sensor network data with existing, large-scale sensors such as remote sensing instruments or large datasets, or other data provided from heterogeneous type of devices. In crop and livestock activities, farmers need to associate their activities with a lot of environmental condition (e.g. water and soil quality, weather forecasts and so on). The idea of a sensor web [12], which enables the interoperability of sensor data to support re-use of existing sensor networks, and relating the sensor data with stored data (i.e., historic and contextual data in databases) and graphical sources (e.g., maps, raster, vector), aims to meet these challenges. The term sensor web describes a distributed web service architecture for publishing, discovering, and combining data from multiple sensor networks and related data sources. A sensor web architecture is the set of data model definitions and web service specifications that comprise [13] the Open Geospatial Consortium Sensor Web Enablement (OGC-SWE) framework as the state of the art in this type of issue. The three data model standards-Observations and Measurements Schema (O&M)], Sensor Model Language (SENSORML), and Transducer Markup Language (TML)-provide syntactic data models for representing sensor measurements, the sensors that capture the measurements, and the processing performed on the measurements, respectively. The web service specifications define a service-oriented architecture that provides the functionality to interoperate with sensors and their data across organization boundaries over the Internet. The Sensor Observation Service (SOS) provides the means by which sensor data can be published, allowing other services and applications to request sensor data. The Sensor Planning Service (SPS) enables, where it is permitted by the sensor, new tasks to be passed to the sensor. The Sensor Alert Service (SAS) and Web Notification Service (WNS) provide mechanisms by which services, applications, and users can receive alerts regarding sensor readings. The OGC-SWE framework does not define a registry service. One option for incorporating such functionality is to use the OpenGIS catalogue service. The OpenGIS catalogue service is based on an attribute-value pair data model over which filters, expressed as attribute-operator-value statements, can be applied. In the semantic sensor web architecture proposed, both the data model (viz. RDF) and the query language (e.g., SPARQL) provide a greater level of expressivity. For example, semantic terms drawn from an ontology can be used to refer to spatial geometries besides using coordinates to explicitly specify them.
So, a semantic middleware from the state of the art is used for sensor devices but is not suitable for other devices (different from sensors themselves) that have to be connected each other. The progress in this direction is to have a middleware for different type of communicating devices with API and different and interoperable ontologies.
AFarCloud takes the opportunity to manage the progress in semantic middleware, deploying semantic-driven communication system and services. The goal of AFarCloud can be that of showing that the same service-oriented architecture could be deployed over all various demonstrators, "activating" differentiated services depending on the particular needs. For instance: raspberry crops in Finland could have very different needs from olive crops in Italy, but the platform should remain the same and semantic middleware layer can be modular to achieve heterogeneity in devices.

STO2: Intelligent coordination and decision-making solutions
The three pillars of this Scientific and Technical Objective are adaptive autonomy, hierarchical planning, and decision-support systems and human-robot interaction.
The autonomy and the self-reconfiguration capability are the peculiar aspects of modern of CPS [14]. Indeed, A salient capability of an autonomous CPS is to adapt with the environment. This interaction influences the behavior of the interacting autonomous system and, is a more challenging problem in presence of several interacting cyber-physical system [15]. Adaptive autonomy refers to changes in the autonomy levels of an autonomous system, via a continuous sensing/learning of the scenario in which the system operates [16].
High level planning allows a multi agent system to perform its tasks in a coherent and non-conflicting way and also to cooperatively enhance the system's performance by considering agents' capabilities as well as their execution context. AFarCloud assumes orchestration of a heterogeneous set of adaptive autonomous systems. Hierarchical planning plays a major role in this process, since the plan provides a top-down view, whereas agents represent the bottom-up view. The goal here is to allow minimum number of operators/users to manage the systems. The adaptive autonomy framework will help the design of highly complex intelligent robots/vehicles that can adapt to the service needs of the operators, through the ability to adapt themselves to the operator in a way which is not possible today. This will lower the perceived complexity in using these systems.
In addition, a decision-support solution, combined with seamless human-robot interaction and hierarchical planning modules that will function in real-time aims at improving the coordination of robots and. The decision-support solution will also play an important role in helping the operator to make even better decisions since the proposed solution assumes integration of information from vastly different sources. Thus, in this project the decisions-support solution's ability to fuse information from many different sources is going to be essential.
For human-robot interaction we can think that this "collaboration" permits to achieve the task without interruption due to synchronization and conflict resolution of agents. Seamless and intuitive interaction for control of a set of complex machines has many applications. In AFar-Cloud human/vehicles communication can improve the knowledge of farming procedures, considering data gathering from sensors and decision support system for actuators. Decision-support systems that can fuse information from large number of sources is another important technology with a considerable innovation potential.

STO 3: Environment characterization platform
There are some previous fragmented projects working on specific areas related to the deployment of an environment characterization platform for smart farming. FLOURISH (H2020-ICT) includes multispectral three-dimensional mapping with high temporal and spatial resolution, ground intervention tools and techniques, data analysis tools for crop monitoring, weed detection, and user interface design to support agricultural decision making. EU-PLF (FP7-KBBE) has developed management tools aimed at continuous automatic monitoring of animal welfare, health, environmental impact and production in real-time. PIGWISE (Eranet ICT-AGRI) develop an ICT based tool for performance and welfare monitoring of pigs at the individual level, by monitoring warning signs, such as alterations in animal behavior and some other parameters, to enable an early detection of diseases or environmental related problems. ROBOFARM (Eranet ICT-AGRI) aims to create a technology platform that integrates and harmonizes existing software and hardware technologies into a single system and makes use of robots equipped with sensors and active vision systems to automatically collect data from the field, feeding a farm management DSS and considering the agronomical, environmental and food safety aspects.
The progress beyond the state of art consists of a Holistic approach to develop a distributed environment characterization platform, aiming at providing services for monitoring and managing the farm. The platform will combine positioning, mapping, classification and identification technologies along to integrate data streams provided not only by deployed UAVs and other mobile and stationary IoT-aided devices, but also by data streams provided by cloud and data analytic components, that integrate the information coming from other farms and external heterogeneous data sources. It will also support data analysis based on gathered data allowing new information to be inferred.
The technological achievements of the project will produce significant innovation in the agricultural sector because AFarCloud will allow farmers to have greater awareness and familiarity about precision agriculture, with practical benefits also in economic impact.

STO 4: On the move sensors and actuators
At present crop monitoring is made with sensors on board tractors, e. g. Yara N-Sensor, Trimble Green Seeker, John Deere HarvestLab [27] satellite multispectral image data, e.g. MODIS, Landsat, GeoEye, WorldView [28] and UAV multispectral image data, e.g. AiriNov, Micasense as well as with fixed soil sensors. Nitrogen requirement of crops is measured by the Yara N-Sensor and Trimble Green Seeker systems while the tractor passes an area. These solutions provide precise data with respect to location compared to satellite multispectral image data, which has lower spatial resolution. There are also many instruments for precise ground observations made by an operator. If the methods above are compared one can see that UAVs provide a number of advantages [29]. They provide higher resolution that satellites and also are more cost efficient. A satellite solution is on the other hand more time efficient. Although making measurement through ground observations provide high spatial resolution it is time consuming and, as a result, also costly. UAVs and ground observations can be based on the demand services, however, again UAVs are still the more cost efficient.
The major targeted progress beyond the state of the start is the development of on-board sensors and actuators that are able to monitor, sample and actuate over different plants and animals without a previous deployment of sensors. This enables beyond state-of-the-art automatic monitoring of health status, effect of illness prevention measures, optimal environmental and nutrition conditions of both animals and crop. With proper sensor data, accurate and timely actuations such as feeding, irrigation, spraying and fertilization can be carried out with better than what is possible with the present methods.
By the point of view of innovation potential, VTT (Technical Research Centre of Finland) has generated a comprehensive IPR portfolio around the Fabry-Perot interferometer technologies which form the key element in on the move sensors. The sensor technology based on FPIs can be ramped-up from small-series production to larger volumes using MEMS manufacturing approach. SPECTRAL ENGINES has recently developed a portable NIR analyzer for measuring moisture content in agricultural products. Based on these experiences AFarCloud has a good potential to develop a new product line to crop nutrient and growth monitoring. The solution is planned to utilize NIR technology by VTT, tailored to different use scenarios. If found feasible, also integration to existing products will be experimented. CRS is specialized to small and cost-efficient sensors working in connection with mobile devices and backend services. This basic architecture is now to be applied also to outdoor condition monitoring of air and soil. Small and affordable sensor nodes can be scattered to the field and thus be used for more precise awareness of environmental variables of field. CENTRIA has earlier worked especially with energy efficiency and radio propagation issues of sensor nodes and networks. With AFarCloud especially energy harvesting and power management of sensors will be further developed to promote energy-independent sensing.

STO 5: Development of a methodology for efficient design, validation & verification of livestock management and cropping operations
The optimal usage of a limited number of resources in a complex, time-varying environment is a challenge. Even if the number of resources and available tools is not a limitation, the aspect of accurate timing in livestock management and cropping operations can make the difference between failure and success. In this context, decision-support systems have the ability to play a critical role, both for analysis of large amount of data to generate sound conclusions in less time critical cases, and when fast response is required. As mentioned previously in STO2 there are currently services on the market that can address basic needs during the processes and there are some EU projects about plans monitoring and crop monitoring, each of them take into account the precision use of resources (water, fertilizers, etc.) by using sensors, communication layer and internet technologies to support the decision process: WATERBEE (REF: 283,638 Funded FP7-SME) allows farmers to save water, watering just at the time and place required, OPTIFERT (REF: 2,836,772, Funded FP7-SME) deploys a system that combines fertilization and irrigation, and reflects the increasingly widespread trend among farmers to use computers to keep track of the consumption of water and fertilizer in a simpler way and ENORASIS (REF: 282,949, funded FP7-SME) [30] uses a wireless sensors network installed on the farms to collect information about factors (soil moisture, atmospheric temperature, insolation, wind speed and precipitation) affecting the need to water their crops. However, advanced data processing and decision-making require emergence of systems that are even more sophisticated. Yet another challenge is related to usage of autonomous systems in farming. Main body of design principles and methodologies for autonomy are from aerospace, space and military domains [31]. Very little exists for farming. In addition, the lack of suitable methods for verification and validation (V&V) prevents development of autonomous systems for many application domains including farming [32]. Higher levels of autonomy will require viewing the autonomous system in relation with its operation environment.
Similar to other application domains farming is undergoing a transition though automation. In parallel there are other major technological factors, such as IoT, Cloud computing, etc. All these factors will change farming. What is needed is to develop a structured approach for specification, design and verification of autonomous systems (including UGVs, AUVs and sensors) used in autonomous farming. This novel approach needs to be integrated with a framework for V&V that can address resource utilization through decision-support systems, seamless human-robot interaction and hierarchical planning.
Methods for design and V&V are key enablers for making autonomous vehicles industrially useable. Our solution will open up new market opportunities for suppliers of vehicle systems, sensors and data collection systems and solve existing challenges for end users. From a technological point of view, all various type of sensors and other IoT nodes will be used with UAV or UGV support to monitor health status and other physiological parameters about the crop, with multispectral analysis. It will be used a cloud computing framework to make these data available by a web dashboard.

Validation scenarios
The project is founded on three holistic demonstrators, including cropping and livestock management scenarios: Finland, Spain and Italy (at months 12, 24 and 35, respectively). In addition, and following an incremental prototyping approach, the project is validated through a set of local demonstrators, which run during the lifetime of the project, deployed in different locations (Latvia, Czech Republic, Italy, Spain and Sweden). The location of the holistic and local demonstrators has been selected to represent different climate and production areas across Europe. In order to validate the results at the end of the project, baseline data will be gathered for each location within 3 months of the project. Thus, the validation procedure will compare the final figures obtained with the aforementioned baseline data.
Following a cloud computing approach these data will be available by a web dashboard. Therefore, it will be possible to gather all the data about farms among the various demonstrator sites, and to combine them to create a knowledge base for the crop and livestock in Europe and take into account yearly cycles. This approach will demonstrate a solution for how big data analysis for agricultural application should be defined. The three holistic scenarios are a closed-loop system of systems, that combines cropping and livestock scenarios. They will include common technologies from the cropping management, such as selective monitoring, pests and illnesses detection and more targeted weed reduction, precision fertilization and harvesting optimization. Fig. 2 depicts a conceptual diagram of the holistic scenarios based on an example for livestock nutrition management.

AFarCloud cropping management scenarios
AFarCloud cropping management scenarios (Fig. 3) includes a wide variety of species such as berries, fruits, grapes, cereals and horticultural products in different locations across Europe. In these demonstrations meteorological and soil's condition will also be measured, processed, fused with the purpose of helping the farmer to take decisions. Another key tool in decision making is the decision-support system services, which will address specific problems.
From a technological point of view, implementation and integration of sensors (whether WSN or sensors on board a UAV and/or ground vehicles) all the way up to the decision-support system solutions are central in all the scenarios. In particular, following plants at all the stages of their life (germination, growth, maturation, harvest, pruning needs etc.), protecting plants from the frost, weeds, pests and illnesses, which need to be detected at early stages and treated as soon as possible, and demonstrating both autonomous monitoring of the plant growth and management.
Autonomy, and autonomous systems, are central concepts in all demonstrations. Whereas monitoring of an area, a field or a barn, can be achieved similar to traditional automation, much like monitoring robot cells in an industrial setting, more advanced monitoring and  The key is adaptive autonomy, i.e. the ability for an autonomous system to adapt its level of autonomy to a given task or problem. Another important factor is information sharing between vehicles and machines, which will facilitate communication and collaboration. Thus, it is assumed that, an approach that assumes intelligent control by the operator through planning and continuous monitoring, adaptive autonomy for flexible plan execution, and extensive information sharing between all parts, will both increase the successful outcome of a mission plan, and support the operator when the mission plan needs revision in real-time.

AFarCloud livestock management scenarios
Livestock management, through smart technologies considers three principal factors, i.e. (i) feed management, (ii) health status and (iii) movement control. (Fig. 4). The livestock feed management can be improved by using a central planning system to determine the amount of food to be distributed to the animals for optimal nutrition as part of grazing management. For example, the main food of cows is grass and it would be important to monitor the nutritional parameters of grass fed to the animals, but also to deploy wearable devices to monitor rumination.
The health status can be provided by sensors measuring vital parameters such as temperature, pulse, breathing, oxide-reduction potential and pH. In addition, behavior monitoring is also relevant for detection of animal fertility or illness. Internet of Things radio networks such as SigFox, NB-IoT and LoRa can offer a breakthrough solution especially to the extensive livestock farmers. The use of long-range and low data-rate communications and combining it with IMUs and GNSS technology can provide tracking information related to animal behavior. The possibility of collecting data in the cloud allows unprecedented possibilities to carry out relevant statistical data analysis for efficient livestock management. The third factor is the livestock movement control, the daily livestock operation is based on the management of the animals that are grazing. For example, in those farms with large extensions of pastures, it is difficult to find the cows and calves. It is necessary to know the location of the cows, those that close to the calving date, those that inheat, the position of their calf or the health of cows and calves.

Contributions and achievements
Started in September 2018, the AFarCloud project will last for 36 months. In order to split the contributions of partners into specific tasks, eight (8) Work Packages (WPs) were designed for the project focusing on the functionalities and architectural layers, as depicted in Fig. 5. An  incremental prototyping approach was selected for those WPs were design and develop tasks are carried out (WP2-WP6) as well as for demonstration and validation tasks within WP7.
Several reports have been issued the first year, in line with the deliverable milestones. The software architecture is ready, and implementation, integration and testing are ongoing. Several software modules and hardware were demonstrated at the end of year one. The main modules of the AFarCloud layered architecture (Fig. 5) are described in the following sub sections.

AFarCloud platform architecture
The final AFarCloud Platform Architecture was defined (Fig. 6) and consists of three main functional components: (i) the Farm Management System, (ii) the Semantic Middleware and (iii) the Hardware Layer. Besides, the AFarCloud platform is connected to other external data sources like third-party data and legacy systems databases.
The Farm Management System offers: a Mission Management Tool (MMT) to plan cooperative missions involving Unmanned Aerial Vehicles (UAVs or drones) and Ground Vehicles (GVs) ranging from autonomous Unmanned Ground Vehicles (UGVs) to legacy systems (i.e., tractors); a Decision Support System (DSS) to make decisions pre-, during-, and post-mission; a System Configurator to configure both the AFarCloud instance of each farm and the above-mentioned systems, including their key hardware components (mission relevant sensors and other components important for performing a mission); and, applications for the user to manage and monitor the whole system.
The Semantic Middleware offers among others, components for: data storage and retrieval from the Cloud; managing and cataloguing images; registration of IoT devices, animals and vehicles in the farm; data flow management inside the platform; managing, controlling and acquiring data from IoT devices and missions involving ground and aerial vehicles; data processing and knowledge extraction. The Semantic Middleware implements a software layer that hides the underlying complexity of the hardware layer, so that the Farm Management System can access the hardware in a unified way. The AFarCloud middleware uses semantic models, specified by the AFarCloud ontology to abstract the heterogeneity of the underlying hardware, and to ensure that all information is stored according to a common information model that guaranties interoperability. The semantic middleware acts as a communication centralizer, disseminating messages between the Farm Management System and the hardware layer. The Semantic Middleware offers a set of communication interfaces to the hardware layer, like: DDS, to send missions to UAVs/UGVs and retrieve their feedback and status in realtime; ISOBUS, to manage communications with ISOBUS compatible ground vehicles; MQTT, to manage communications with standalone and vehicle onboard sensors and actuators; and REST, to retrieve data from legacy systems databases.
The Hardware Layer provides the means to deploy and integrate the services and data related to unmanned aerial vehicles, ground vehicles, actuators, sensors and other IoT devices. In this complex context, extensive testing of sensor hardware is required before deploying prototypes in the field. Testbeds like LabSMILING [33] have been used by many Italian partners to design and test their sensor networks.

The Farm management system
As briefly explained in the AFarCloud Platform Architecture, the MMT is the core of the Farm Management System. The MMT is the link between the users, and the various technologies that belong to the AFarCloud project, as well as external services such as, satellite images, or historic data from the same location. The decision-support system, and the configuration manager are two separate components that provide specific services. The former is critical in decision making process including all the steps previous to defining a mission, further during the mission and after the mission when the data that is collected is analyzed. The latter is of major importance since it allows configuration of various different UGVs, UAVs and, where applicable, the legacy systems prior a mission. The common architecture for the DSS has been implemented and is ready to be integrated with the MMT. The MMT is fully integrated with the AFarCloud Middleware, which means that the users, independent of their locations, can interact with the AFarCloud solution in a seamless manner (Fig. 7). Note further that, the approach taken here assumes that the MMT can provide relevant services to different needs, meaning that the MMT can be deployed in a farm, or another entity that provides services to the farm. Obviously, an agricultural service provider does have other needs than the farm, more importantly ought to have restriction with regard to how to control the deployed system. The MMT architecture is developed to allow such a separation in seamless manner.
Hierarchical planning is a critical service provided by the MMT. It allows orchestration of a group of semi-autonomous systems, referred to as UGVs/UAVs (Fig. 8). The GUI of the MMT has been designed to handle the process of preparing and monitoring a mission using different type of devices (e.g. smartphone, tablet, PC). One of the features is to provide the ability to interact with the UGVs/UAVs during the mission in order to make the needed changes if the plan is not going to succeed so the GUI addresses and supports the interaction to overcome those issues.

Environment characterization platform
The environment platform includes the processing of data, related to the environment, which can come from the sensors, drones, images, weather, third parties, historic data, etc. The diversity of utilized sensors and variety of parameters to be monitored and quantified for all the scenarios and/or applications within AFarCloud project requires specific algorithms for data pre-processing, data fusion and data processing for animal, crop and environment data. The developed algorithms and  During the past decade software has been moving from the desktop solutions to cloud services. As a result of this development the end-user has been released from location (e.g. work at office) and partially also from having greater amount of computation power on the desktop computer. However, vice versa the transition has increased the importance of network availability. The network connection is generally a basic requirement for services used over the internet, but an equally important factor is the availability of a service. With cloud services, the requirement of processing power still does exist although it may not be visible for the end-user. However, it is visible for the service provider that may run the services on its own servers or can outsource them to servers on another vendor. In AFarCloud project the services developed and tested are running on servers as well. To have a possibility to estimate service availability, a tool for the monitoring of the cloud resources, which includes endorsing and discovering cloud resources from a pool of cloud offerings, has been developed.
In the area of agriculture, the carbon footprint is a value that tells the environmental impact of a product produced at a farm. The carbon footprint tells you about how the products are made and how efficient is the production. The carbon footprint combined with other information will provide you good tools to restrain climate change. For the consumer it indicates the impact of choice made at the time of acquisition. The effect of making choices is also valid for the producer, for example in production methods, the producer strongly influences on the overall carbon footprint of the product. Carbon footprint calculation has been developed for dairy farms. This calculation utilizes a huge amount of values from different sources (animals, crop production, energy consumption etc.). The output from the calculation is the carbon footprint value for a kilogram of energy corrected milk. Multiple other environment data related solutions are also under development considering for example, Sustainable Production and Distribution Certification, Plot weather forecasting, Localized current status reporting, Status report for greenhouses activities and Real-Time status reporting for nonautonomous vehicle/legacy tractor (also fleet management).

Sensors and actuators development
The main objectives of the sensors & actuators in AFarCloud are to provide data and information that can be aggregated in order to extract knowledge to make actions on the farm environment, supporting a more efficient use of available farming vehicles at the same time. This work focuses on three areas: Crops (e.g. soil temperature, soil humidity, rain/ sun hours, multispectral imaging), Livestock & Environment (e.g. air temperature, air humidity, gases) and Livestock wearable (behavior, activity, temperature, pH).
Sensors, actuators and systems were developed for measuring various parameters and functionalities for all 11 scenarios. Many prototypes for wireless sensors and sensor systems network for crop and soil monitoring were deployed on the field for real-time and continuous monitoring (Fig. 9). Heterogeneous wireless communication protocols are used, e.g. LoRa, 3 G/4 G, WiFi, SigFox, RFID, depending on the existing coverage in the field, greenhouse or barn. By having already deployed sensors in the first year, data can be generated for algorithms development and cloud-based solutions (e.g. environment characterization, data analytics). Also, information is obtained for the optimization of the field sensors regarding robustness and reliability for mechanical, electrical, and communication characteristics. More than 10 types of sensors were tested for livestock and health monitoring, e.g. animal position, silage dry matter and protein content, total mixed ratio, pH in rumen. Actuators for air purity and sanitization were also deployed in the greenhouse and slaughter room.

How to realize autonomy
One goal of the AFarCloud project is to provide a methodology that gives a structured way of analyzing autonomous agriculture operations and systems. The goal of the methodology is to make the systems developers able to design, develop and validate dependable autonomous functionality efficiently. The methodology has been developed in the first year analyzing autonomous operation from three different viewpoints: 1) The operational viewpoint 2) The system viewpoint 3) Verification and Validation The operational viewpoint facilitates a common understanding between system designers and end-users, as well as making sure that the system design will be grounded by the actual operation it is intended to solve. The system viewpoint concerns the realization and composition of autonomous functionality. Architecture, autonomy paradigms and safety are among the subjects that are covered by the methodology. The verification and validation viewpoint are concerned with how to make sure both system and operation behave according to requirements (verification) and according to reason (validation). Use of operational monitoring is emphasized to counteract the challenges of analyzing infinite states and responses.

Semi-autonomous vehicles
Involvement of vehicles with a high degree of autonomy is essential in order to reduce the human workload associated with farming. The vehicles in AFarCloud are being designed/retrofitted to accept mission plans and mission updates from the MMT. Initial requirements to autonomous farming vehicles have been identified and include high precision localization, collision avoidance with static and dynamic objects, low probability of critical single failures, a rugged weather resistant exterior and a modular payload design (particularly relevant for multi-purpose UAVs). Additionally, for a fully autonomous solution, autonomous docking stations are under development to facilitate charging, data uplink/downlink and environmental protection. Autonomous air and ground vehicles are being integrated with the AFarCloud middleware platform. The work is progressing towards supporting the Y2 demonstrations with several vehicles and autonomous features.

Conclusions
This paper has presented the AFarCloud ECSEL JU project. It will provide a distributed platform for autonomous farming that will allow the integration and cooperation of agriculture Cyber Physical Systems in real-time in order to increase efficiency, productivity, animal health, food quality and reduce farm labor costs. As the paper is written after the first year of the project, it presents the main achievements reached after this period. More consolidated results will be presented in future publications.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.