Outdated building standards, control systems and barn management approaches: together they cause suboptimal resource use within EU pig production. That results in high emissions and losses.

Now concern for welfare is rising, pig farmers struggle to maintain competitiveness. The PigSys project considers a whole system improvement.

PigSys, an ERA-NET project, addresses issues of outdated building standards, control systems and barn management by adopting a multidisciplinary, cross-scale, system-level approach to pig production. This way, the project ensures that all aspects relevant to sustainable, socially acceptable and economically viable pig production systems are adequately addressed.

With partners from different European regions – and the inclusion of Germany, France and Denmark as three of the five biggest European pig producers – the project not only has geographical and climatic balance but also ensures its relevance across the EU.

To this end, a comprehensive model of mass and energy flows and a decision support system, as well as novel building climate-control systems, are being developed to underpin a sustainable improvement in overall performance. This will allow:

  1. Improvement in the productivity, resilience and competitiveness of European animal production;\
  2. Improvement and better management of resources to reduce waste and enhance the environmental sustainability of European animal production; and
  3. Improvement of on-farm practices to enhance consumer acceptability and address societal challenges associated with animal welfare, product quality and safety, biodiversity and provision of ecosystem services.

Monitoring behaviour and health

Recent technological developments have expanded the possibilities of monitoring and assessing animal behaviour, health and welfare on large- and small-scale farms through machine vision, either three-dimensional (3D) or two-dimensional (2D), along with machine learning (e.g. deep learning) techniques. These techniques have a wide range of applications, flexibility, cost and efficiency.

In the PigSys project, data from 2D video cameras were used to develop a machine learning–based, deep learning in particular, monitoring system. Image data from different commercial and research farms in different European countries (i.e. Germany, Sweden, Denmark and France) were used to train and validate the deep learning techniques. The developed models can continuously monitor group and individual lying and standing postures as well as the activity of group-housed pigs in barns (see Figure 1).

The developed models were transferred to a microcontroller (single board computer – Raspberry Pi – equipped with a camera) which allows the use of the developed system in different farming conditions. The models can score the behaviours in online (real-time) and offline (recorded video and image data) conditions. The scored data can be continuously saved in excel files. The results from the test phase of the developed deep learning models in different farming conditions (both weaning and fattening) show that the proposed model has flexibility and good robustness across different pig farm constructions, lighting conditions, age of the animals and skin colour.

Algorithms for climate control

The machine vision technique was further used to develop algorithms for climate control within the pig barn. The adapted control strategy allows continuous measurement and cross-examination of process parameters by measuring the difference between the real time data collected via non-invasive devices. Environmental sensors and cameras, and the reference data known as the set points, have been used to further adjust and optimise the control mechanism.

For instance, in a pig barn at a room temperature of 21°C, the visual sensors recognise that the pigs are lying far apart from each other even when the set point of 21°C is reached, indicating that the conditions are still too warm for the pigs. That information is passed to the controller, which then decides the action for the ventilator. As the controller has defined settings for the pigs’ lying pattern, it will prompt the ventilator to open further to allow air circulation. It will maintain this action until the visual sensors trigger the next signal that the lying pattern of the pigs is back to normal.

Model reference adaptive control system

This closed loop control strategy is also known as the model reference adaptive control system. In addition to the defined control settings, definition of fail-safes is also currently under development, for example, temperature over-riding the dynamic control if the set limits are reached, air composition over-riding dynamic control and/or temperature if the concentration of noxious gases is too high.

Images, gases and climate sensors

The control model is run through an open source single board computer (Raspberry Pi) based programmable logic controller (PLC) system as the core element of the described system. The input parameters (image recognition, sensors for noxious gases and barn climate sensors) are transferred to the PLC though mentioned input module extensions, where they are processed and then an output signal is generated which is further transferred to the ventilator via an output module extension. Visualisation of the current system conditions as well as the ability to change settings is realised through an industrial touch display built into the control cabinet. Both the display and the control cabinet are suitable for use in agricultural environments, as they withstand dust and water penetration, meeting the IP65 standard.

If needed, the system can also be extended with a wireless or ethernet network connection which provides the opportunity to supervise the current system state from a distance, not only directly at the control cabinet. The developed system can be used (with some modification) for other livestock farming climate control systems.

PigProgress | Barbara Sturm, Sharvari Raut, Phil Kirchhofer, Simone Müller and Abozar Nasirahmadi | November 20