Nowadays, the request for enormous data traffic transfer and use of high speed internet has led in increasing demand for capacity and improving quality in communication systems. With the increase in human population and consequently increase in number of Internet users, the need for more advanced telecommunication systems is more evident. Therefore, massive MIMO systems has received more attention recently. These systems which are composed of a base station equipped with a few hundreds of coherent antennas transmitting data to dozens of users, have made significant improvements in spectral and energy efficiency. One method of maximizing spectral efficiency includes applying the appropriate optimized data and pilot power allocation algorithms. In recent years, schemes such as successive convex approximation, game theory, geometric programming, iterative algorithms based on Hungarian method, improved waterfilling algorithm and etc, have been offered in order to allocate data and pilot power optimally for maximizing spectral and energy efficiency in massive MIMO. It has been shown in multicell massive MIMO uplink with ZF detector while each BS has perfect CSI of channels in its cell, regarding the lower bound of sum rate, the optimal power allocation scheme is waterfilling algorithm. In this thesis, we consider same scenario while each BS has imperfect CSI in its cell. Here, the aim of the convex optimization problem is maximizing sum rate for all users of central cell. In this case, we derive a lower tight bound for sum rate of each user and formulate an optimization problem based on it. This problem which is based on large scale coefficients, as the number of base station antennas grows asymptotically is approximated by an optimization problem being solved through geometric programming. Moreover, this problem can be converted to a convex problem. In this thesis we use CVX toolbox for solving the optimization problem. Simulation results show the superiority of the proposed power allocation method compared to equal power allocation in terms of sum rate. Als the optimization problem for MRC detector while each BS has perfect CSI in its cell, and while each BS has imperfect CSI in its cell, is studing and its results is compairing with MRC detector's results. Keywords: 1-5G wireless communication, 2-Massive MIMO systems, 3-Sum rate, 4-Power allocation