Network coding is seen as a promising technique to improve network throughput. In this paper, network coding in cooperative relay networks and user cooperative networks is investigated and an optimized power allocation scheme is provided. By comparing with traditional relay forwarding in a simple two-user scenario, network coding shows a better system performance with a lower hardware cost and higher spectral efficiency, and this scenario can be extended to general multi-user environment without much cost.