Design and hardware implementation of a cooperative communication system