Lifetime Improvement of Wireless Sensor Networks by Collaborative Beamforming and Cooperative Transmission