Lifetime analysis and improvement of an amplify-and-forward wireless relay network