Media playback is unsupported on your device Media caption Luke Speller from the Shoal Consortium explains how robo-fish works

In the shallow waters of Gijon harbour, in northern Spain, a large, yellow fish cuts through the waves.

But this swimmer stands apart from the marine life that usually inhabits this port: there's no flesh and blood here, just carbon fibre and metal.

This is robo-fish - scientists' latest weapon in the war against pollution.

This sea-faring machine works autonomously to hunt down contamination in the water, feeding this information back to the shore.

Here in Spain, several are undergoing their first trials to see if they make the grade as future marine police.

Image caption The port at Gijon, in northern Spain, is being used as a testing environment

"The idea is that we want to have real-time monitoring of pollution, so that if someone is dumping chemicals or something is leaking, we can get to it straight away, find out what is causing the problem and put a stop to it," explains Luke Speller, a senior scientist at the research division of BMT Group, a technology consultancy.

The company is part of the Shoal consortium, a European Commission-funded group from academia and business that has developed these underwater robots.

"At the moment, in harbours, they take samples about once a month," says Mr Speller.

"And in that time, a ship could come into the harbour, leak some chemicals somewhere, then it's gone, all the way up the coastline.

"The idea is that we will use robot fish, which are in the harbour all of the time, and constantly checking for pollution."

Inspired by nature

The fish, which measure about 1.5m-long, may be a little larger than their real-life counterparts, but their movements closely mimic them.

We can work in environments that are very weedy, and would usually snag up propellers Dr Ian Dukes, University of Essex

Ian Dukes from the University of Essex - another partner in the consortium - says that nature was an obvious inspiration for their robot.

He explains: "Over millions of years, fish have evolved the ultimate hydrodynamic shape, and we have tried to mimic that in the robot.

"They swim just like fish; they are really quite agile and can change direction quickly, even in shallow water."

But the researchers say there are other advantages to a fishy design compared with some other autonomous underwater vehicles (AUVs).

"Traditional robots use propellers or thrusters for propulsion," says Dr Dukes.

"What we're trying to do is use the fin of a fish to propel ourselves through the water.

Image caption Can robo-fish serve the public trust? Tests like this should give some idea

"The fin does lend itself for a really useful tool in shallow waters especially where there is a lot of debris. We can work in environments that are very weedy, and would usually snag up propellers."

The fish use micro-electrode arrays to sense contaminants. In their current form they can detect phenols and heavy metals such as copper and lead, as well as monitor oxygen levels and salinity.

But the team has tried to build in flexibility.

Dr Speller explains: "We have designed it so you can pull out the chemical sensor unit, and put in different ones for something else, such as sulphates or phosphates, depending on the environment that you are monitoring," he explains.

Hunting party

One they've sniffed out a problem, the fish use artificial intelligence to hunt down the source of pollution.

What I'd also like to see is not just a single task robot, but robots that can multitask Dr Luke Speller, BMT Group

They can work alone or in a team, communicating with each other using acoustic signals and they can continuously report back to the port.

The trials at Gijon have been designed to put all of this technology to the test to so they can finalise the design of their robots.

"When we have our prototype, then we'll know what needs to be done to make this a complete commercial system. We hope it could happen in the next few years," said Dr Speller.

"In the future, what I'd also like to see is not just a single task robot, but robots that can multitask - robots that can do search and rescue, monitoring for underwaters divers, at the same time as tracking pollution."

Water pollution is an expensive business.

The Department for the Environment Food and Rural Affairs (Defra) has estimated that in England and Wales alone, cost of water pollution in rivers, canals, lakes and coastal waters came to £1.3bn per annum.

But it may be some time before robotic fish become permanent fixtures in our waters.

Image caption Constant watch: teams of robot fish could check for pollution

Prototypes currently cost about £20,000 each, although Mr Speller says costs will drop once more are produced.

But battery life is also an obstacle. At the moment, the fish need to be recharged about every eight hours.

But, says Richard Harrington from the Marine Conservation Society, if the fish could overcome these barriers they could have a future.

He says: "Ports, harbours and estuaries can be challenging places to routinely monitor for pollutants, often with a lengthy time period between sampling and transport and laboratory time for analysis.

"A remotely operated device could be deployed quickly and simply in shallow water environments, enabling a rapid response for decision making and remedial action to be taken."

The Shoal consortium is formed of the BMT Group, the University of Essex, the Tyndall National Institute, the University of Strathclyde, Thales Safare and the Port Authority of Gijon.