Skip to main content

Monitoring and certifying environmental sustainability in pig farming

NetPig is a use case focused on monitoring and certifying environmental sustainability in the pig farming sector. This use case has been designed following the official methodology of the Oficina del Dato, whose best practices can be consulted in the Good Practices for Use Cases section.

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

Introduction

Goals

NetPig’s main goal is to facilitate the sustainability certification process for pig farmers, addressing the key challenges currently faced in this area.

Main goal

Facilitate the sustainability certification process for pig farmers.

The system aims to greatly simplify the certification process by automating the processing of required data. This automation significantly reduces the administrative burden traditionally involved, eliminating tedious manual tasks. The result is a considerable decrease in both costs and time.

Additional goal

Reduce administrative burden, and thus lower costs and time spent on procedures.

NetPig also places strong emphasis on preserving farmers’ full control over their data. The system ensures data sovereignty, guaranteeing ownership and complete control by the producers.

Additional goal

Preserve farmers’ full control over their data.

Lastly, NetPig seeks to generate added value from data, enabling its monetization. This opens new business opportunities and access to markets that value certified sustainability.

Additional goal

Generate added value from data.

Problem Description

The pig farming sector faces major challenges in sustainability certification processes, marked by inefficient workflows and limited technological tools.

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

Mandatory certifications

The first opportunity focuses on obtaining mandatory certifications from public administrations, which can benefit from digitalized and efficient processes.

Voluntary certifications

The second opportunity relates to voluntary certifications with private entities, which can add value, improve ethical positioning, and facilitate access to more demanding markets.

The lack of adequate digital tools negatively impacts efficiency and the ability to seize certification opportunities that could improve farm competitiveness.

Proposed Solution

The solution involves using the AgrospAI data space as a technological platform to digitalize and optimize the certification process.

Leveraging the data space

AgrospAI provides the infrastructure to effectively connect farmers, technical offices, public administrations, private certifiers, and other stakeholders.

NetPig preserves the traditional communication structure between farmers and technical offices, while digitalizing and automating subsequent processes. This maintains trust while improving efficiency.

Fig. 2. First opportunity: voluntary certification with a private certifier via AgrospAI. (source: AgrospAI)

Fig. 3. Second opportunity: mandatory certification with a public administration via AgrospAI. (source: AgrospAI)

The data collected by technical offices is uploaded to the data space, from where certification services can be applied automatically to generate reports and certificates.

Preserving data control

Farmers retain full sovereignty over their data, deciding what to share, with whom, and for what purpose.

This solution enables access to both mandatory and voluntary certifications from a single platform.

Official Methodology

Feasibility Assessment

The NetPig use case is led by AgrospAI, coordinated by the University of Lleida. It responds to growing pressure to reduce the environmental impact of pig farming, with increasingly demanding national and European regulations.

Key data points for certification are identified: farm type, resource consumption, emissions, and mitigation technologies. The roles are also defined: data providers (farmers, offices), consumers (authorities, certifiers, researchers), service providers, and the facilitator AgrospAI.

An interaction model is created to show the relationships between roles with chronological arrows.

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

The potential value lies in controlled data sharing, delivering economic, operational, and reputational benefits. Success indicators include administrative efficiency, data quality, and emissions reduction.

The complexity of interaction is also assessed, noting the diversity of stakeholders and sensitive data, within a regulated environment. Trust and interoperability services are required.

Finally, with an estimated budget and available resources, the decision is made to proceed to the design phase.

Use Case Design

NetPig aims to create a reliable mechanism for sharing pig farm environmental data, which is currently fragmented. Sovereignty, privacy, and trust are prioritized in a federated model.

The functional model defines four roles: consumer, data provider, service provider, and facilitator. The architecture is based on secure identification, compute-to-data operations, and smart contracts. Interoperability with Pontus-X and Gaia-X standards is encouraged, and compensation mechanisms are enabled through digital wallets.

Six key dimensions are considered:

  • Commercial: fees, branding.
  • Legal: binding EU regulation, smart contracts.
  • Functional: user experience, privacy.
  • Technical: federated architecture.
  • Operational: daily management, service agreements.
  • Project: planning and execution.

NetPig Algorithm – Sustainability Report Generator

For a practical approach, AgrospAI has developed a service that generates environmental sustainability reports based on sensor data from farms, powered by the NetPig algorithm.

What does the algorithm do?

It analyzes real-time CO₂ and NH₃ sensor data to:

  • Assess indoor air quality.
  • Apply limits from Royal Decree 159/2023.
  • Determine if a farm is eligible for environmental certification.
  • Automatically generate a PDF sustainability report.

What data does it use?

It works with CSV files containing the following columns:

  • datetime: timestamp.
  • CO2: carbon dioxide concentration (ppm).
  • NH3: ammonia concentration (ppm).

Example dataset: CEP - Environment and Comfort.

Certification logic

Applied criteria:

  • If more than 5% of values exceed the limit → not eligible.
  • If all values are within limitseligible.

Limits according to RD 159/2023:

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

✅ The NetPig algorithm is just one example of the services that can be offered within a data space.

Results and Benefits

The service does not expose raw data or original files. The output is a sustainability report with:

  • Time-based graphs and distributions.
  • Summary statistics.
  • Final eligibility diagnosis.

Fig. 5. Result of the algorithm: sustainability report. (source: AgrospAI)

Benefits:

  • Certification automation → less admin workload.
  • Data sovereignty: full control remains with the farmer.
  • Added value: documentation for grants, certification, or market differentiation.

In short, NetPig shows how a service within a data space can turn data into value in a secure and efficient way.

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/