Robosparrow used to research swamp sparrows in the US
US biologists have used a robotic dead bird to help them study the behaviour in the swamp sparrow species.
Scientists at Duke University in North Carolina have worked with some engineering students and a taxidermist to operate the wings of a deceased swamp sparrow in order to carry out the research.
They used programming and a tiny linear motor inside the cavity of the bird they named Robosparrow.
The study was looking at male aggressive behaviour among the species and was carried out over a period of two months.
In the end, it confirmed that wing-flapping is a sign of male aggression in the species.
Dr Rindy Anderson, who led the study, told the BBC: "We had to be able to use computer software to control the motor, to programme it to move the wings at particular intervals.
"It's not a random movement. Ultimately what was really difficult was getting everything so small."
The budget for the research was just $1500 (£990) and Dr Anderson said that the initial plan was to modify an existing motor from a remote-controlled aeroplane or car but they were all too large to fit inside the 18 gram bird, the size of an average house sparrow.
"Our engineer built a linear motor from first principles, and then re-miniaturised it until we got something to fit."
Once the motor was in place and the robot chip was programmed, the mounted bird was put in the wild along with a discreet sound system playing swamp sparrow calls to attract others.
The wing-waving robot lasted for two months but was regularly attacked, said Dr Anderson.
"We had no back up - every day was a wish and a prayer that he survived the sixty trials," she added.
"Eventually the head fell off and the wing stopped moving."
The living male birds were equally aggressive to Robosparrow whether its wing movements were activated or not, the researchers found.
"It confirmed our hypothesis that the wing-waving behaviour is functioning male aggressive communication," said Dr Anderson.
"It was a lot of work - the engineering students had never done it before, the taxidermist we used had never done it before.
"We really just scratched the surface of what this behaviour is."
Dr Anderson's research has been published in the journal Behavioral Ecology and Sociobiology.