In this paper, we investigate the effect of channel estimation errors on the capacity of amplify-and-forward cooperative relay systems. Since an exact capacity expression in the presence of channel estimation errors is difficult to be found, we turn to derive its lower bound instead. Accordingly, by maximizing the derived lower bound, we propose power allocation schemes for both single-relay and multi-relay systems. For single-relay systems, an analytical solution for inequality constrained problem is too complicated to be obtained. Thus, we propose a gradient descent algorithm with a log-barrier function to solve the inequality constrained problem. For multi-relay systems, in terms of the channel estimates and the corresponding mean-squared errors, we provide a water-filling solution for the optimal power allocation among the relays. Simulation results show that the proposed power allocation schemes yield capacity gain compared with equal power allocation at low to medium signal-to-noise ratios.