Skip to main content

Monitoring and Certification of Environmental Sustainability in Pig Farming

NetPig is a use case focused on monitoring and certifying environmental sustainability in the pig sector. This use case has been designed following the official methodology of the Data Office, whose best practices can be consulted in the best practices section for use cases.

Fig. 1. Commercial logo of the use case. (source: AgrospAI)

Introduction

Objectives

NetPig's main objective is to facilitate the process of obtaining sustainability certifications for pig farmers, addressing the main challenges they currently face in this area.

tip

Main Objective Facilitate the process of obtaining sustainability certifications for farmers.

Firstly, the system aims to significantly simplify the certification process by automating the processing of data required for certifications. This automation drastically reduces the administrative burden traditionally placed on farmers, technical offices, or public administrations, eliminating tedious manual processes. As a result, a considerable decrease in costs associated with the certification process and significant time savings in necessary procedures and formalities are achieved.

tip

Other objectives Reduce the administrative burden and, as a result, decrease the costs associated with the certification process and save time in procedures.

Concurrently, NetPig places special emphasis on preserving farmers' full control over their data at all times. The system guarantees data sovereignty, ensuring that producers maintain complete ownership and control over the information generated on their farms.

tip

Other objectives Preserve farmers' full control over their data.

Finally, NetPig aims for farmers to generate added value through their data, facilitating the monetization of collected information. In this way, the system not only facilitates obtaining certifications but also opens up new business opportunities and access to markets that particularly value certified sustainability.

tip

Other objectives Generate added value for farmers through their data.

Problem Description

The pig sector currently faces significant challenges in sustainability certification processes, characterized by inefficient workflows and limited technological tools that hinder the obtainment of certifications.

This situation creates two clear opportunities that NetPig aims to address:

info

Mandatory Certifications The first opportunity focuses on applying for mandatory certifications from public administrations. These types of certifications are legal requirements that farmers must meet, and obtaining them through digitized and efficient processes can result in considerable savings in time and resources.

info

Voluntary Certifications The second opportunity addresses the application for voluntary certifications with private certifying entities. These certifications help farms improve their ethical and sustainability branding, providing added value that can translate into better commercial conditions and access to markets more demanding in environmental terms.

The lack of adequate digital tools not only impacts process efficiency but also limits farmers' ability to access certification opportunities that could significantly improve the competitiveness and sustainability of their farms.

Proposed Solution

The proposed solution to address the identified problems involves using the AgrospAI data space as a technological platform to digitize and optimize the sustainability certification process in the pig sector.

tip

Leveraging the data space AgrospAI provides the necessary infrastructure to create a digital ecosystem that efficiently connects all actors involved in the certification process: farmers, technical offices, public administrations, private certifying entities, and others.

The NetPig solution is based on creating a system that maintains the traditional communication structure between farmers and technical offices, but digitizes and automates subsequent processes. In this way, established trust and roles are preserved, while operational efficiency is significantly improved.

Fig. 2. First opportunity to address. Obtaining a voluntary certification with a private certifying entity through AgrospAI. (source: AgrospAI)

Fig. 3. Second opportunity to address. Obtaining a mandatory certification with a public administration through AgrospAI. (source: AgrospAI)

The AgrospAI data space allows for the implementation of a workflow where, once the technical office has collected data from farmers, it only needs to upload them to the data space. From there, it can access various public and private certifying services that would automatically apply to this data to obtain, for example, sustainability reports and certifications. This approach not only reduces processing times but also minimizes human errors associated with manual data handling.

info

Preservation of data control Through the use of AgrospAI, farmers maintain sovereignty over their data at all times, being able to control what information is shared, with whom, and for what specific purposes.

The proposed solution addresses both mandatory and voluntary certifications, creating a unified framework that allows farms to access both types of certification from a single platform, maximizing opportunities to generate added value through their sustainability data.

Official Methodology

Feasibility Assessment

The NetPig use case is driven by AgrospAI, an agri-food data space demonstrator led by the University of Lleida. It emerges in a context of increasing regulatory and social pressure on the pig sector to reduce its environmental impact, where a conflict exists between economic profitability and sustainability. Current legislation, from the SDGs to European and national regulations, mandates the adoption of more sustainable techniques. Through the use of the data space, the aim is to automate certification processes and improve efficiency, traceability, and transparency. Additionally, new key actors such as technical offices are identified, playing an essential role in document management and regulatory compliance.

Next, key data for obtaining certificates are identified: farm type, resource consumption, estimated emissions, and reduction technologies. This data can be obtained manually or through IoT sensors. The roles of the space are defined: data providers (farmers, technical offices), consumers (administrations, certifiers, researchers), service providers, and the AgrospAI facilitator. Data sovereignty always lies with the generator.

To better understand the interactions between different actors, an interaction model is created. This model shows the main interactions between roles with arrows and labels them in chronological order.

Fig. 4. Interaction model. (source: AgrospAI)

The potential value of the use case lies in data owners being able to share their data under their consent, always maintaining control and obtaining benefits such as new income or better decisions. Success indicators include administrative efficiency, data quality, satisfaction of involved actors, and emission reduction. Socially, it can contribute to sustainability, public health, and equal opportunities between large and small farms. The evaluation shows economic, efficiency, and reputational benefits for all involved roles. Overall, it is considered viable due to its expected positive impact.

Next, the complexity of the interaction of the use case is analyzed, considering the actors, data, and environment. There is a medium diversity of actors with possible collaborations and competition among them. Shared data is varied and, in some cases, confidential. The environment is heavily regulated, and technicians with medium knowledge of data spaces participate. This level of complexity requires services that guarantee trust and interoperability.

Finally, considering an estimated budget, it is decided to proceed with the use case. The environment has consultants and support resources, such as digital credentials, documentation, and technical assistance. The use case is considered viable, and its design phase begins.

Use Case Design

The NetPig use case aims to create a structured and reliable mechanism for sharing environmental data from the pig sector, which is currently dispersed and poorly interoperable. The goal is to facilitate environmental certification and improve efficiency through a data space that guarantees the sovereignty, privacy, and trust of farmers. The design incorporates ethical principles such as transparency, social justice, and participant autonomy, within a federated and scalable model. Data is primarily processed using compute-to-data approaches, allowing analysis without needing to move information from its origin.

NetPig's functional model defines four key roles: consumer, data provider, service provider, and facilitator, each with specific responsibilities within the data space. The architecture relies on reliable identification and authentication mechanisms, federated infrastructure based on compute-to-data, and smart contracts on a distributed ledger to guarantee sovereignty, privacy, and traceability. Interoperability is promoted through common standards of the Pontus-X and Gaia-X ecosystems, along with decentralized catalogs that allow for the discovery of data and services. Additionally, compensation mechanisms are enabled through digital wallets and smart contracts, facilitating the secure and auditable exchange of value.

To ensure the effective and sustainable operation of the use case, six key dimensions have been identified. In the commercial dimension, aspects such as pricing structure and brand strategy are addressed. The legal dimension reflects the shift towards binding regulation at the European level, moving away from voluntary sectoral agreements; the use of smart contracts and governance inherited from the AgrospAI data space are also highlighted. The functional dimension includes user experience and privacy protection. Regarding the technical dimension, a federated architecture that preserves data sovereignty is chosen, as opposed to centralized models. The operational dimension covers daily management, service level agreements, risk mitigation, and support tools. Finally, the project dimension covers the overall planning and management of the implementation.

NetPig Algorithm - Sustainability Report Generator

To provide a practical approach to the sustainability use case in the pig sector, AgrospAI has implemented a service that generates environmental sustainability reports from farm sensors. This service is based on the NetPig algorithm, developed following the service provision model within a federated data space.

What does the algorithm do?

The NetPig algorithm analyzes environmental sensor data installed in pig farms, specifically carbon dioxide (CO₂) and ammonia (NH₃) concentrations, recorded in real-time. From this data:

  • Evaluates the indoor air quality in the livestock farm.
  • Applies thresholds established by Spanish legislation (Royal Decree 159/2023) [3].
  • Determines if a farm is eligible for an environmental certification based on sustainability.
  • Automatically generates a sustainability PDF report.

What data does it use?

The algorithm is applied to datasets in CSV format containing the following columns:

  • datetime: timestamp of the measurement.
  • CO2: carbon dioxide concentration in ppm.
  • NH3: ammonia concentration in ppm.

As is the case with the CEP - Environment and Comfort dataset.

Certification Logic

The algorithm incorporates diagnostic logic that follows these criteria:

  • If more than 5% of the values exceed the recommended limit → the farm is not eligible.
  • If all values are within the limits → the farm is eligible for certification.

The limits used, according to Royal Decree 159/2023, are:

GasRecommended Limit
CO₂3,000 ppm
NH₃20 ppm

✅ The NetPig algorithm is just one example of the type of services a specialized provider could offer within the data space.

Result and Benefits

When the NetPig algorithm is applied within the data space to an environmental dataset like the one mentioned, raw measurements or original files are never exposed or shared. Instead, the execution result is an automatically generated sustainability report, which contains:

  • Graphs of temporal evolution and gas distribution.
  • Summarized statistical analyses.
  • A final diagnosis indicating whether the farm is suitable or not for environmental sustainability certification.

Fig. 5. Result of the algorithm's execution that the consumer can download. It contains a sustainability report. (source: AgrospAI)

This approach has multiple benefits aligned with NetPig's initial objectives:

  • Automation of the certification process, which significantly reduces the administrative burden for farmers, technicians, or public entities.
  • Preservation of data sovereignty: farmers maintain full control over the information collected on their farms, as algorithms access the data only to generate value, without the need to share it openly.
  • Generation of added value: the final report can be used as technical documentation for certification processes, access to aid, or market differentiation.

In short, NetPig demonstrates how an algorithm offered as a service in a data space can securely transform data into useful value.

References

[1] Use case development model for data spaces – datos.gob.es. Available at: https://datos.gob.es/es/blog/modelo-de-desarrollo-de-casos-de-uso-para-espacios-de-datos

[2] How to evaluate and design use cases for data spaces – datos.gob.es. Available at: https://datos.gob.es/es/blog/como-evaluar-y-disenar-casos-de-uso-para-espacios-de-datos-guias-para-facilitar-el-camino

[3] Rotecna. (2023). Ammonia and CO₂ limits in pig farming: recommendations for optimal welfare. Retrieved from https://www.rotecna.com/en/blog/ammonia-and-co2-levels-in-pig-farming/