Skip to Main Content
You might also like...

On a pig farm in Thailand, researchers wearing protective gear from head to toe attach sensors beneath the panels of a muddy pig pen floor. The sensors don’t have cameras and they are protected by waterproof boxes to survive the harsh, dirty environment in the pens. Instead of visuals, the sensors pick up vibrations to detect pig movement and behavior.

In a Carnegie Mellon – CMKL | Thailand collaborative research project, Hae Young Noh and Pei Zhang are developing these sensors to track pig movement and manage pig health in a noninvasive way. Currently, raising pigs requires the use of a lot of antibiotics—it is cheap, safe, and keeps the pigs alive when illness strikes. But this quickly leads to drug resistance as the antibiotics stop being effective. Without the antibiotics, farmers can quickly go bankrupt from one bug killing their entire stock.

It’s good to know quantitatively what kind of sickness the animals have.

Hae Young Noh, Associate Professor, Civil and Environmental Engineering

“We had been thinking about animal tracking and animal monitoring for a while, and we noticed that antibiotics is a big issue for animal welfare as they are quickly becoming ineffective due to overuse,” said Noh, an associate professor in civil and environmental engineering. “It’s good to know quantitatively what kind of sickness the animals have.”

The sensors detect even the tiniest pig’s movement based on the vibrations from their footsteps or other motion. Each time the pig comes in contact with the floor it creates a vibration that the sensors can detect—similar to what happens when humans walk. By tracking healthy pig behavior, they can also detect abnormal behavior that could indicate the pig is ill. The farmers can then isolate the sick pigs or administer antibiotics only when the pigs are sick.

Monitoring the pig behavior in this way could also provide valuable information that can be used to increase farm efficiency. For example, are all of the pigs feeding? Are any of the baby pigs being unintentionally injured? Unlike visual sensors, they don’t require a line of sight or consistent lighting. The pigs also don’t need to wear something that could create discomfort.

The team of researchers has a partnership with Betagro Farm in Thailand, where they have so far done two sensor deployments. The sensors are geophone sensors—the kind used for earthquakes. Ten sensors were placed in two pens: one pen with 20-30 pigs and the other with a mother pig and her piglets. Once they collect the data from the signal, they apply machine learning to differentiate between the different pigs’ movements, even classifying between the large pigs and small piglets.


While the team still has more results to collect, the initial results showed changes in the pigs’ activity level over time, noting that activity depends on the time of day. As the piglets grew, their overall energy per day increased over time, and they exhibited a regular daily pattern. The team will continue to monitor pig behavior and optimize the machine learning model to be able to distinguish between not only sick and healthy pigs, but pigs with different kinds of illnesses. The sensors could eventually be used to monitor other animals once they are able to develop the technology further. Because the sensors are inexpensive, they could also work on any size farm. The researchers also have a similar project that detects human gait to predict and prevent falls of elderly patients.

“On the practical side we are hoping to have a system that farmers can use to monitor pigs 24/7, predicting when a pig may be sick or aggressive or in danger, so they can respond before anything bad happens,” said Zhang, an associate research professor in electrical and computer engineering. “We want what we present here to inspire other researchers to use structural response to detect activity inside buildings. We want buildings not just to become smart, but empathetic in a way—so they can understand and respond to our wants and needs.”