Precision livestock breeding – improving both health and production in dairy cattle

Last changed: 18 March 2021
Cows in barn

Agricultural systems need to improve in order to meet future challenges of an increasing human population and at the same time ensure good animal welfare and a minimal ecological footprint. This project focuses on how to improve animal welfare and health in dairy cattle production using sensor technology, with the potential to minimize antibiotic use by improving tools for disease control and management.

A primary component of the project is to use a real time location system to study the indoor movement and social interactions of dairy cattle. We will investigate the possibility to select for increased milk yield considering effects of social interaction with the purpose to improve the social environment of the cows.

We will use theory developed for indirect genetic effects (IGE). To model IGE, it will be essential to first understand the social interactions, as an IGE is a genetic effect of an individual on the trait value of the other individuals in the same group.

The location and movement of the cows will also be used to investigate disease transmission. An existing simulation model of spread and control of mastitis causing pathogens will be further developed using cow location data and pathogen data.

We will develop decision-support tools for farmers to minimize transmission of mastitis within their dairy farms in close collaboration with Växa Sverige.

Project goals:

  • To develop tools for summarizing animal movement and social interactions in dairy farms.
  • To develop methodology for breeding on indirect genetic effects (IGE).
  • To develop decision-support tools for minimizing disease transmission within dairy farms based on knowledge gained from animal movement and social interactions.

This is a collaborative research programme between the Swedish University of Agricultural Sciences (SLU), University of Copenhagen (KU), Dalarna University (DU), Wageningen University and Research (WUR), RISE Research Institutes of Sweden and Växa Sverige.

Project blog


Workshop on precision livestock farming and social interactions in dairy cattle

On the 2nd – 3rd of September we gathered our project members and invited guests and had a workshop on precision livestock farming and social interactions in dairy cattle. Some of us were present in Copenhagen while some joined via Zoom.

”It was great meeting everyone in Copenhagen and although some participants attended online it felt like everyone were in the meeting room. Considering that it was only two half days we were able to cover a wide range of topics and discuss research in detail all the way from data interpolation and Streptococcus dysgalactiae to predictions of pig feed and strategies for handling co-authorships”, says Lars Rönnegård.

Marc Ahlse from Sony in Lund joined the meeting online and told us the story about how the company entered into the dairy industry, solving problems using the Sony technology to monitor cows. “Dairy cows are both high tech and low tech at the same time”, he said.

Eleven people stand in a row with a brick house as a background.

From left to right: Anna Silvera, Svenja Woudstra, Ida Hansson, Freddy Fikse, Volker Krömker, Anna Skarin, Lars Rönnegård, Moudud Alam, Per Peetz Nielsen, Maya Gussmann, Carsten Kirkeby Missing in the picture are: Keni Ren and Mikhail Churakov who participated online.


Precision Livestock Farming Workshop Seminar

In April 2021 several members of the group participated in the virtual Precision Livestock Farming Seminar arranged by KU Leuven, Belgium. 

Lars Rönnegård gave a presentation with the title "Cow Social Interactions and Disease Transmission" - click on the link if you want to see the presentation.

Below are the abstracts from the other presentations at the workshop. 

Cow Social Interaction and Disease Transmission

Lars Rönnegård, Freddy Fikse, Volker Krömker, Carsten Kirkeby & Per Peetz Nielsen

The social interaction between cows is important, both for production and animal welfare. The goal of our research is to increase animal welfare through improved understanding of cows’ social interaction, with potential to improve animal welfare and production.

In this project, we collect data with different types of automated systems and sensors on two farms, one in Sweden and one in the Netherlands, with over 200 dairy cows per farm. The individual position of each cow is registered once a second with an ultra-wideband system and stored on a common server since February 2020, to track the behaviour of the cows. Other individual cow data (lactation number, milk production, milk order, claw health, etc.) are also collected. Furthermore, during the period June - October 2020, bacterial samples were sampled regularly from each individual teat on all cows as well as samples from lying stalls and other exposed areas of the barn, in order to investigate disease transmission. Recently, cameras were installed on the Swedish farm to enable observational studies. All in all, this is a world-unique data set, carefully collected to specifically answer the questions in the project.

We investigate how social interactions affect disease transmission with a focus on mastitis and we will develop a digital decision-support tool for dairy farmers to minimize mastitis transmission. Furthermore, we aim to investigate how breeding for social interactions might affect production, in collaboration with Växa Sverige.

In our talk we will give an overview of the data we have collected so far, present some preliminary results, and wish to discuss further ideas to develop in the project.

Can connection patterns be clustered to separate agonistic from affiliative social behaviour in dairy cattle using a real time location system?

Anna Silvera, Ida Hansson, Keni Ren, Per Peetz Nielsen, Lars Rönnegård

Cattle is a gregarious species who lives in herds, based on dominance hierarchies, where they form social relationships with each other. These social relationships are based on interactions between individual animals and can be categorized into agonistic interactions (socio-negative) and affiliative interactions (socio-positive). The agonistic behaviours include behaviours connected to dominance and can be described as aggressive acts and responses to aggression. Examples of agonistic behaviours are chasing, head butting and fighting. The response is mainly avoidance and replacement, but could result in confrontation and fighting. Affiliative behaviours include proximity, allogrooming (social licking) and providing food and protection to individuals in the herd. Allogrooming is a behaviour that reinforces social bonds, is suggested to reduce tension and have a strong link to positive animal welfare. The social preferences of cattle are also reflected in their spatial proximity to others in the herd. Cows form preferential relationships with some individuals, while avoiding others.

In this study we will perform behavioural observations from video recordings in a commercial dairy herd. Both agonistic and affiliative behaviours will be identified. All individuals in the dairy herd is connected to a real time location system (RTLS) (CowView, GEA Farm Technologies, Bönen, Germany) and their position in the barn is continuously recorded approximately every second. The aim with this study is to investigate if the RTL-system can be used to identify and separate affiliative and agonistic social interactions in cattle herds. The results in this study will be used to further investigate the possibility to use automatic identification of social interactions to asses animal welfare and the prospects of including this information in future breeding goals.

Resting location preference of dairy cows inside the barn

Mikhail Churakov, Anna Silvera, Per Nielsen

Cows spend a significant amount of their time lying down in bedding areas that are divided into individual cubicles on most commercial dairy farms. The choice of cubicles for sleeping, drowsing and ruminating is not random, previous studies suggested that cows’ preferences depend on their social rank, age and stage of lactation.

Here, using data from real-time location system (RTLS) we describe cubicle choice preference of cows on two commercial dairy herds in Sweden and the Netherlands. We summarise time spent in cubicles by groups of cows defined by parity or stage of lactation, and in specific areas inside the barn. Preliminary results suggest that cubicles closer to feeding areas are preferred by all cows, older cows prefer to occupy cubicles that are also closer to the milking area, and the stage of lactation also affects cubicle choice. However, a robust methodology to assess cubicle occupancy patterns is not yet established.

This study is important to better understand resting space usage by cows inside the barn. More optimal bedding arrangements can lead to less competition for space and, in turn, for less stress, better animal welfare and higher productivity of dairy cows. Data-driven decisions are at the heart of precision livestock farming and here we show how RTLS positioning data can be leveraged.

What characteristics determine the total duration of proximity interactions a dairy cow has?

Ida Hansson, Keni Ren, Anna Silvera, Lars Rönnegård, Per Peetz Nielsen, Svenja Woudstra

The social environment caused by neighbouring cows in a dairy herd greatly impacts the well-being and the production of a cow. Social interactions between individuals can be categorized into aggressive and positive interactions and can, therefore, both stress cows and have a calming effect. Cows have shown to differ in their tendency to stay close to other individuals, and some cows seem to create preferential bonds with individuals with similar attributes. However, it is not fully understood what characteristics determine the number of proximity interactions a cow has with other individuals. Advanced sensor technology can be used to measure indoor movement and dairy cattle's social behaviour. This study aims to collect positioning data of dairy cattle in two herds, with approximately 200 cows per herd, using an ultra-wideband indoor positioning system (CowView, GEA Farm Technologies, Bönen, Germany). The position of each individual is recorded every second, with an accuracy of 30 cm. The total duration of proximity interactions each cow has is registered during a 14-day study period, and a distance threshold of 2.5 m between two cows is used. With this real-time location system (RTLS), the proximity interactions between two individuals are also predicted to be in different barn areas, such as at the feeding table, in the walking alley, or the cubicles.

Furthermore, individual attributes, such as parity and days in milk, will be investigated if they affect the total duration of proximity interactions a cow has. This study aims to understand how cows associate in order to further understand disease transmission and the assessment of indirect genetic effects in dairy cattle. It is an ongoing project, and some preliminary results will be presented. We wish to discuss methodology when using automated sensor data to monitor individual animals' interactions, e.g. selection of proximity thresholds, and how an interaction with impact potential should be defined.

Importance of the milking process in the transmission of mastitis pathogens in a dairy cow herd

Svenja Woudstra, Maya Katrin Gussmann, Carsten Kirkeby, Per Peetz Nielsen, Volker Krömker

Mastitis, the inflammation of mammary glands, is one of the most important health issues in dairy cow herds worldwide. It has a high economic impact due to milk production and quality losses as well as costs associated with treatment, prevention and premature culling. Furthermore, it is the major reason for the use of antimicrobials in dairy farms and an important animal welfare issue. Most mastitis cases are caused by bacterial pathogens that enter the mammary gland through the teat channel. Reservoirs of pathogens can be the environment or infected udder quarters. It is postulated, for pathogens spreading contagiously from animal to animal, that indirect contact of udder quarters via fomites during milking (e.g. consecutive use of the same milking equipment, or pathogen transmission via milkers´ hands) is the primary mode of transmission. Still, to date, no study has estimated the impact of these transmission pathways.

Nowadays, modern milking parlor technology allows the recording of cow positions at consecutive milkings and thereby enables long-term tracking of indirect cow contacts during milking.

Therefore, we are currently conducting a research project to determine if and how the level of previous indirect contact to infected udder quarters (through different pathways) during milking affects the Odds of an udder quarter to acquire a new intramammary infection. Over 12 consecutive weeks, data on cow positions during milking was collected from one Swedish dairy herd. Over the same period, milk samples were collected from all lactating cows (n=263) at afternoon milkings in 14-day intervals. All milk samples were analysed by standard milk microbiology with consecutive species confirmation by MALDI TOF-MS. For species that caused a relevant number of new infections throughout the sampling period, strain typing will be carried out. Mixed logistic regression models will be used to calculate species-specific (if possible strain-specific) Odds ratios for udder quarters to acquire a new IMI or not depending on the level of previous indirect contact to infected udder quarters during milking.

At the workshop, we intend to present the used methodology and would like to discuss the planned analyses.


Student projects during autumn 2020

During the autumn term of 2020 two groups of students from Uppsala University joined the research team.

Li Ju, Linus Kanestad and Gustaf Andersson worked on a project with the title “Construction of a database storing cow information for SLU research” under the supervision of Keni Ren. The database allows easy access of the collected data for individuals cows. You can see their poster by following this link

Torsten Malmgård and Björn Sparresäter worked on a project with the title "Detecting social interactions between cows" under the supervision of Mikhail Chirakov and Lars Rönnegård. The students looked at the incidents of displacement at the feeding area to detect avoidance behavior. Have a look at their poster by following this link. 


Presentation at workshop in biology and medicine

Lars Rönnegård has presented the project at the Workshop on Modelling in Biology and Medicine on Oct 15th 2020. His presentation with the title "Social interactions in dairy cattle" is available on YouTube. You can also download the slides of the presentation


Workshop on cow social interactions and disease transmission

On 7th - 8th September we gathered all participants in the projects and some invited guests in a workshop on cow social interactions and disease transmission at SLU in Uppsala. We updated each other on background and status of the different parts of the projects and planned the upcoming work. Most team members could be present in Uppsala, some joined via zoom. 

Thanks to all particpants for a fun and rewarding workshop!

Participants at the workshop on cow social interactions and disease transmission

Standing from left to right: Anna Silvera, Anna Skarin, Maya Gussmann, Keni ren, Svenja Woudstra, Freddy Fikse, Ida Hansson, Lars Rönnegård, Tariq Halasa , Volker Krömker

On screen: Nina Melzer, Zhuoshi Wang, Isabelle Veissier, Per Peetz Nielsen, Piter Bijma, Mikhail Churakov

Participants in workshop

From left to right: Freddy Fikse, Lars Rönnegård, Keni Ren, Svenja Woudstra, Anna Skarin, Maya Gussmann, Volker Krömker, Anna Silvera, Tariq Halasa, Ida Hansson


Two new PhD students 

We have recruited two new PhD students - welcome to the team! 

Svenja Woudstra, PhD student in the research group of Prof Volker Krömker at the University of Copenhagen

Title of project: Infection dynamics in bovine mastitis

What is the aim of your project?

"The aim of my PhD project is to generate further knowledge on the transmission of mastitis causing pathogens within dairy farms. Traditionally these are categorized in two groups, environmental and contagious. During the past two decades, this categorization has been challenged as evidence of environmental pathogens spreading as contagious pathogens and vice versa has emerged. Additionally, no study has quantified the different transmission routes in order to unravel how many new infections actually originate from the environment and how many from the milking parlor. Therefore, we will take samples at one farm every two weeks for half a year and follow the dynamics of the infections. The outcome of this project shall provide further information for farmers and veterinarians on transmission routes and help to evaluate the importance of measures to prevent the spread of mastitis causing organisms. "

What sparked your interest in this project?

"I have a background as a veterinarian and have worked for some years in the Institute of Food Quality and Food Safety in Hannover, Germany. I have focused on the potential role of Clostridia in chronic diseases of cows and even did a doctorate within that field. Since I mostly worked in the laboratory, I then wanted to go on to more field work and started to work at the Clinic for Cattle in Hannover within a German national prevalence study on dairy cow health.

I got interested in this PhD project for two reasons. I really wanted to continue to work with dairy cows and learn more about mastitis. My supervisor Volker Krömker is an excellent researcher within the field of bovine mastitis and everything fell into place very nicely."

Ida Hansson – PhD student in the research group of Prof Lars Rönnegård, Department of Animal Breeding and Genetics, SLU

What is the aim of your project?

"The aim of my PhD project is to study indirect genetic effects of social interactions of cows. To start with I will analyse data from two farms, where the positioning of every individual cow is recorded every second. I am going to look for evidence for any specific behavior, including both positive and negative relationships. I will combine the results with genetic data, and later on also add observations studies. The overall goal is to include indirect genetic effects in breeding. This has not been done to a large extent in cows before."

What is your background and how did you get interested in this PhD project?

"I have a Bachelor degree in Animal Sciences from SLU and did thereafter a Masters in Quantitative Genetics and Genome Analysis at the University of Edinburgh in Scotland. For the last few years I have worked as a breeding advisor for dairy farmers in Uppland at Växa Sverige. I have helped the farmers with breeding strategies and breeding plans to match cow and sire.

I have always had the idea of doing a PhD in the back of the head but wanted to wait for the right opportunity. I also wanted to gain some practical experience first, which I did through my work at Växa Sverige and previous positions. When I saw the advertisement for a PhD position in Lars Rönnegårds group and this project I knew it was time."


Start of the project

On the 8th of January 2020, a first meeting with all participants was held at SLU in Uppsala. The coming months we will focus on employing three postdocs and two doctoral students at SLU and University of Copenhagen.

From left to right: Moudud Alam, Anna Skarin, Freddy Fikse, Per Peetz Nielsen, Lars Rönnegård, Tariq Halasa, Volker Kromker, Natalie von der Lehr

Popular Science

Den digitala ladugården

I det senaste nyhetsbrevet från SLU infrastrukturen Gigacow uppmärksammas projektet som ett exempel hur man kan utnyttja befintlig teknik för ny forskning, i det här fallet för att studera hur kor rör sig i ladugården och interagerar med varandra genom att använda sensorer som samlar in positionerna på korna varje sekund. 

Läs mer i Gigacows nyhetsbrev (sida 4-5)

Bättre social miljö för mjölkkor kan öka djurens välfärd och produktion

Tänk dig att du är en ko i en ladugård. Du finns där, 24 timmar per dygn, 7 dagar i veckan, tätt tillsammans med några hundra andra individer. Vad är det egentligen som får dig att må bra och trivas? Kanske är det friskt och gott vatten och att ha tillräckligt med mat. Torra fötter, med mycket strö på golvet är inte så dumt. Eller är det precis som för oss människor viktigt att känna trygghet och tillit, att inte vara rädd och att inte vara stressad.

Det är lätt att börja tänka på rent fysiska faktorer när det kommer till djurhållning, men det sociala samspelet är av lika stor betydelse. Hur individerna i en ladugård samverkar med varandra spelar roll. Vi vet att stressade kor mjölkar sämre, men vi vet väldigt lite om hur djurens sociala liv ser ut. Vi måste därför öka vår kunskap om de sociala samspelen i en ladugård. Den digitala utvecklingen ger oss helt nya möjligheter att studera de sociala samspelen.

Vi lever inte bara i en ladugård, by eller en stad, vi lever på ett jordklot. Vi är många på klotet, vi blir allt fler, och vår medelinkomst ökar. Det leder till ökad efterfrågan på kött, mjölk och andra djurprodukter. Hur framtidens jordbruk på ett hållbart och rättvist sätt ska kunna öka sin produktion är en av de största utmaningar mänskligheten står inför. En djurhållning som ökar sin produktivitet på bekostnad av djurens hälsa och välfärd kommer även att påverka miljön negativt.

Vi vet redan idag att dåligt reglerad djurhållning kräver mer användning av antibiotika, vilket globalt sett är ett enormt problem. Det ger resistensutveckling hos bakterierna, och i förlängningen sämre möjligheter till behandling av både människor och djur. För att kunna möta den ökande efterfrågan på animalieprodukter behöver vi öka produktionen samtidigt som miljöpåverkan måste minimeras.

Det är här djurhälsa och socialt samspel i lagårdsmiljö blir viktigt. Målet med vårt forskningsprojekt är att i framtiden kunna bedriva avel på mjölkavkastning, där sociala interaktioner mellan kor byggs in i avelsmodellen, för att på så sätt kunna öka produktion och samtidigt öka djurvälfärden. Dessutom kommer vi att studera hur sociala interaktioner påverkar sjukdomsspridning för att på så sätt ge praktiska råd till mjölkbönderna.

Hur kan vi ta reda på mer om det sociala samspelet? Det är ett snabbt växande forskningsfält där det finns ny avancerad teknik att tillgå för att samla in information djurens beteende. Man kan idag följa hur korna rör sig i ladugården och hur de mjölkar med hjälp av data från olika sensorer och mjölkningsrobotar. Det finns redan mycket data som samlas in med den nya tekniken och vi vill använda dessa data för att ta reda på om en ko beter sig vänligt eller aggressivt. I samarbete med storskaliga projekt för datainsamling kommer vi inom en snar framtid ha tillgång till ännu mer data och en del av projektet är att precisera vilken typ av data vi behöver för att kunna dra slutsatser om hur miljön och det sociala samspelet påverkar produktionen.

Det sociala samspelet påverkar även avelsmöjligheterna. Ett djurs egenskaper hänger samman med dess gener. När djurets egenskaper påverkar omgivande djurs produktivitet kallas det "indirekt genetisk effekt" (IGE). Hur stor effekten blir hänger ihop med hur mycket individerna påverkar varandra, därför är det viktigt att kvantifiera och förstå det sociala samspelet mellan korna. Tidigare har man kunnat studera IGE vid djurhållning i liten skala av andra djurslag och framgångsrikt kunnat bedriva avel på dessa, men det är först nu som vi har teknik som möjliggör att kunna göra det i så stor skala som ladugårdsmiljön kräver. Att få med kornas sociala interaktioner i avelsprogram är alltså betydelsefullt, både för produktiviteten och för djurvälfärden.

Målet är att den enskilda bonden ska kunna märka av en ökad mjölkproduktion genom att korna har det bättre.

Vi kommer att angripa frågeställningarna i detta tvärvetenskapliga forskningsprojekt med forskare inom flera olika områden: statistik, husdjursgenetik, beteendevetenskap, och epidemiologi. För att besvara de frågor vi har behöver vi jobba brett och vi hoppas kunna hitta helt nya lösningar genom att samarbeta. En viktig del i projektet är att utveckla beslutstödverktyg för mjölkbönderna för att hantera sjukdomsspridning och på så sätt minimera användandet av antibiotika. Verktyget kommer att utvecklas med hjälp av datorsimuleringar och insamling av bakteriologiska stickprov från en mjölkgård.

Participants in the project

Lars Rönnegård is the principal investigator of the research programme. Lars is a professor in statistics at Dalarna University and also holds a position as researcher at the Department of Animal Breeding and Genetics, SLU.

Per Peetz Nielsen is a researcher at RISE Research Institutes of Sweden and holds a PhD in Ethology.

Carsten Kirkeby is a senior researcher at the Institute for Veterinary and Animal Sciences, University of Copenhagen.

Volker Kromker is a veterinarian and professor in cattle health at the University of Copenhagen.

Tariq Halasa is a professor at the Institute for Veterinary and Animal Sciences, University of Copenhagen. Tariq Halasa left the project in the beginning of 2021.

Freddy Fikse is employed by Växa Sverige and holds a PhD in Animal Science.

Anna Skarin is associate professor at SLU with an expertise in animal movement.

Moudud Alam is associate professor in microdata analysis at Dalarna University.

Svenja Woudstra is a PhD student at the University of Copenhagen with Volker Krömker as main supervisor.

Ida Hansson is a PhD student at SLU with Lars Rönnegård as main supervisor.

Natalie von der Lehr is a communication officer at the Department of Animal Breeding and Genetics, SLU.


Time period of the project: January 2020 - December 2022

Financial support: The programme is funded by Formas – a Swedish Research Council for Sustainable Development (ID: 2019-02276 and 2019-02111) and by the Kjell & Märta Beijer Foundation.


Lars Rönnegård,, 023-778503

Page editor: