Energy Efficiency Optimization of Massive MIMO Systems Based on the Particle Swarm Optimization Algorithm

As one of the key technologies in the ﬁ fth generation of mobile communications, massive multi-input multioutput (MIMO) can improve system throughput and transmission reliability. However, if all antennas are used to transmit data, the same number of radiofrequency chains is required, which not only increases the cost of system but also reduces the energy e ﬃ ciency (EE). To solve these problems, in this paper, we propose an EE optimization based on the particle swarm optimization (PSO) algorithm. First, we consider the base station (BS) antennas and terminal users and analyze their impact on EE in the uplink and downlink of a single-cell multiuser massive MIMO system. Second, a dynamic power consumption model is used under zero-forcing processing, and it obtains the expression of EE that is used as the ﬁ tness function of the PSO algorithm under perfect and imperfect channel state information (CSI) in single-cell scenarios and imperfect CSI in multicell scenarios. Finally, the optimal EE value is obtained by updating the global optimal positions of the particles. The simulation results show that compared with the traditional iterative algorithm and arti ﬁ cial bee colony algorithm, the proposed algorithm not only possesses the lowest complexity but also obtains the highest optimal value of EE under the single-cell perfect CSI scenario. In the single-cell and multicell scenarios with imperfect CSI, the proposed algorithm is capable of obtaining the same or slightly lower optimal EE value than that of the traditional iterative algorithm, but the running time is at most only 1/12 of that imposed by the iterative algorithm.


Introduction
Accompanying the arrival of the fifth generation (5G) of mobile communications, the wireless communication industry is developing rapidly, and people's demand for the speed of wireless data and the amount of connective equipment is growing at an explosive rate, resulting in increasingly serious economic and environmental problems. In this context, both academics and industry professionals are increasingly concerned about how the energy efficiency (EE) of massive multi-input multioutput (MIMO) systems can be improved [1]. Massive MIMO, which is one of the key technologies of 5G mobile communications, was first proposed by Marzetta in 2010. By installing hundreds of antennas at the base station (BS), massive MIMO can serve multiple terminal users by using the same time-frequency resource, which signifi-cantly improves the system accessibility rate [2]. However, if all antennas are used to transmit data, the same number of radiofrequency (RF) chains are required, which not only increases the cost of the system but also reduces the EE. Therefore, to respond to the call for green and energysaving communications, it is urgent to improve the EE performance of the massive MIMO system [3].
Aiming at solving the problem of EE reduction when using all antennas to transfer information in a massive MIMO system, many experts devote themselves to studying the algorithm to improve the system EE [4][5][6][7][8][9][10][11]. Reference [4] studies the factors affecting the EE of the massive MIMO uplink systems, but it ignores the power consumption of the circuit. On this basis, [5] establishes a power consumption model in which the circuit power consumption is constant to study the EE of massive MIMO systems and draws the conclusion that the system EE increases infinitely with an increasing number of BS antennas. Through the analysis of [4,5], we can see that the existing power consumption models fail to consider the circuit power consumption or treat it as a constant, resulting in the inaccurate expression of EE. In [6], a more realistic power consumption model is considered that only analyzes the perfect channel state information (CSI) scenarios and ignores the existence of imperfect CSI scenarios. Therefore, the establishment of a more realistic power consumption model that is applied in both perfect and imperfect CSI scenarios is crucial for studying the EE performance of the system.
In recent years, a hot topic of study has been the influence of a single parameter on the system EE. Reference [7] analyzes the influence of the number of BS antennas on the system EE and proves that the EE of a massive MIMO system in single-cell and multicell scenarios exhibits a trend of increasing at first and then decreasing as the number of BS antennas increases. Li et al. [8] derive the EE closing expression of single-user massive MIMO systems based on antenna selection technology and demonstrate that system EE is a quasiconcave function about the number of BS antennas. [9] considers the trade-off between performance and computational complexity in massive MIMO system and proposes two efficient transmit-antenna selection schemes in practical systems. [10,11] describe a secure transmission strategy based on spatial sparsity to improve the secrecy capacity of system in uplink and downlink, respectively. [12] describes an antenna selection algorithm that considers the terminal user's CSI and finally obtains the optimal EE value of the system by using the Wishart distribution theorem. In the multiuser massive MIMO system, Byung et al. [13] propose a random antenna selection algorithm to select the antenna subset and demonstrate that the system EE can be improved greatly when the number of selected antennas is more than ten times the number of terminal users. Differing from the above references, there are also some works studying the impact of terminal users on system EE. Considering the downlink of a massive MIMO system, [14] shows that the system EE is a concave function about the number of terminal users, and the optimal EE value and corresponding number of terminal users can be obtained by taking the derivative of the EE function. In addition, [15] investigates a greedy exchange user selection algorithm based on zero-forcing (ZF) precoding that improves the system EE performance on the premise of reducing complexity. Examining the uplink of a massive MIMO system, [16] shows that the system EE can be improved by appropriately shutting off certain special users during the process of information transmission. [17] demonstrates that when the number of terminal users is greater than the number of the BS antennas, both higher throughput and higher EE can be obtained by adopting an appropriate user scheduling scheme before precoding.
The above references regarding EE optimization algorithms only consider the influence of a single parameter on EE. However, the EE of the system is also affected by many other parameters such as CSI, transmission power, and transmission protocol. Therefore, it is necessary to compre-hensively study the influence of multiple parameters on the system EE. [18] explores a joint iterative optimization of the number of BS antennas and the number of terminal users to optimize the EE of multiuser massive MIMO downlink systems. Simulation results show that each terminal user needs approximately two transmitting antennas to achieve the optimal value of EE when CSI is known by the transmitter. Studying the uplink and downlink of massive MIMO systems, [19] derives the expression for the system EE under different processing schemes and finally performs joint iterative optimization of the number of BS antennas and the number of terminal users to obtain the optimal value of EE. However, the iterative algorithm possesses a high computational complexity, especially for a massive MIMO system equipped with hundreds of antennas and terminal users, so the implementation of the algorithm is more time-consuming and inefficient. To reduce the algorithm complexity, [20] proposes a step-by-step optimization algorithm in which one parameter is fixed and another parameter is optimized to improve the system EE. Although the algorithm possesses low computation complexity, it does not consider the relationship between the two parameters and cannot optimize the two parameters simultaneously.
The particle swarm optimization algorithm (PSO), first proposed in 1995, is a random search algorithm based on group cooperation that imitates the foraging behaviour of birds [21]. This algorithm can optimize multiple parameters simultaneously by means of individual interaction and population information sharing, resulting in the quick and efficient solving of multiparameter optimization problems. [22,23] take the capacity of a MIMO system as the objective function and use the PSO to select the receiver antennas. The simulation results show that the PSO can converge to the global optimal solution quickly and achieve good performance. In the MIMO broadcast channel, [24] proposes a joint transmission and an algorithm for the selection of receiver antennas based on the PSO, which can select the antenna that yields the maximum EE for the system in a short time. For a scenario with the same number of RF links and transmitting antennas, the PSO is used to select antennas to maximize the system EE, and it can obtain better EE performance in situations with low complexity [25]. Through the analysis of the above works, we can see that the PSO not only exhibits fast convergence and low computational complexity but also achieves better system performance. However, the PSO is currently used in the antenna selection technology with only one parameter, which fails to obtain the optimal EE. Based on this, we introduce the PSO for addressing EE optimization problems in multiparameter massive MIMO systems.
To review, prior works on the EE of massive MIMO systems have not yet simultaneously optimized the numbers of BS antennas and terminal users for maximum EE under the uplink and downlink of single-cell and multicell multiuser massive MIMO systems with perfect and imperfect CSI. Against this backdrop, our core innovations in this work are as follows. 2 Wireless Communications and Mobile Computing (i) For the uplink and downlink of a single-cell (multicell) multiuser massive MIMO system, we consider the influence of the numbers of BS antennas and terminal users on the system EE under perfect and imperfect CSI. First, we comprehensively analyze the influence of the numbers of BS antennas and terminal users on the system EE. Second, considering ZF processing, we propose a power consumption model in which the circuit power varies dynamically with the signal processing procedure under perfect and imperfect CSI to obtain the expression for the EE of the system. Third, the PSO algorithm, which can obtain better EE performance more quickly by optimizing two parameters simultaneously, is introduced into solve the EE optimization problem for massive MIMO systems (ii) The PSO algorithm can optimize multiple parameters simultaneously with low complexity, but it is only used for antenna selection in the existing studies. Our proposed algorithm creatively incorporates the PSO algorithm for addressing the EE optimization problem in multiparameter massive MIMO systems. Using the expression for EE as the fitness function, the global optimal EE value is obtained by updating the velocities and locations of particles with fitness values. Compared to the traditional iterative algorithm [19] and the artificial bee colony (ABC) algorithm [26], the computational time of the algorithm presented in this paper is at least 10 times higher, which reduces the computational complexity and improves the computational efficiency.
What is more, the proposed algorithm requires fewer transmit antennas to achieve the optimal energy efficiency, which reduces the complexity and cost of system implementation In this paper, bold italic uppercase symbols describe matrices, e.g., H, and bold italic uppercase symbols with subscripts describe vectors, e.g., H i . Constant variables are denoted by uppercase symbols, e.g., H. The Hermitian transpose and inversion operators are denoted by ð⋅Þ H and ð⋅Þ −1 , respectively. The expectation operator is denoted by Ef⋅g.
The rest of this paper is organized as follows. In Section 2, the system model is given, and the expression of EE is derived. In Section 3, the system EE optimization algorithm based on the PSO is proposed. Section 4 shows the simulation results. In Section 5, the conclusion is given.

System and Energy Efficiency Models
2.1. Single-Cell Scenarios 2.1.1. Perfect CSI. In this section, we focus on the uplink and downlink of a single-cell multiuser massive MIMO system. The BS of the system is equipped with M antennas to serve K uniformly distributed terminal users. For analytic tracta-bility, the time-division duplex (TDD) protocol, which is shown in Figure 1, is used between the BS and the users [7]. For the reciprocal of uplink and downlink channels in the TDD protocol, the BS can evaluate the downlink transmission state by employing an uplink pilot signal.
Observe from Figure 1 that K denotes the number of terminal users, and τ ul and τ dl denote the pilot multiplexing factors of uplink and downlink, respectively. U = B C T C represents the number of symbols per coherent block. B C and T C represent the coherence bandwidth and coherence time, respectively.
We assume that the perfect CSI is obtainable at the BS and that the transmission of the downlink channel is obtainable from the uplink pilot signal through the TDD protocol. The propagation path loss is the main large-scale fading between the BS and terminal users, in which the loss is assumed to be same between a user and all BS antennas. H = ½h 1 , h 2 , ⋯h K is used to represent the channel matrix from the BS to the terminal users, where h K = ½h k,1 , h k,2 , ⋯ h K,M obeys the Rayleigh fading model h k ∼ CNð0 M , lðx k I M ÞÞ, where h k,n denotes the channel between the nth antenna at the BS and the kth terminal user. The interference between terminal users degrades the EE performance of the multiuser massive MIMO system, but this problem can be solved by using precoding technology [27][28][29][30]. In the uplink of the multiuser massive MIMO system, [29] uses ZF, minimum mean squared error, and maximum ratio combing/transmission to optimize the capacity of the system. The results show that the linear precoding technique with low complexity can effectively reduce or even eliminate the interference between terminal users in the massive MIMO system. [30] derives that the ZF precoding can eliminate the interference between terminal users to improve the system EE. Based on this finding, we adopt ZF detection and ZF precoding to process the uplink and downlink of the system. G = HðH H HÞ -1 = ½g 1 , g 2 , ⋯g K ∈ C M×K describes the uplink detection matrix, and the downlink precoding matrix is described as V = HðH H HÞ EE (in units of bit/Joule) is defined as the total capacity divided by the total power consumption [31]. In addition, where C total stands for the system total capacity and P total denotes the system total power consumption.

Wireless Communications and Mobile Computing
For the uplink and downlink of a massive MIMO system, the C total term in (1) consists of two parts: where C ul i and C dl i are the rates of the ith user in uplink and downlink, respectively. For ZF processing, (2) can be rewritten as [19].
where C [19] is the total gross rate, which is given by where B (with Hz units) in (4) is the bandwidth of the system and ρ is a constant that is proportional to the signal-to-interference-and-noise ratio.
The total power consumption P total in (1) consists three parts: where P CP is the power required for circuit and P ul TX and P dl TX are the average power of the power amplifier (PA) [19] in the uplink and downlink, respectively. They are defined as where σ 2 is the variance of the noise. ς ul and ς dl stand for the transmission fraction of the uplink and downlink, respectively. φ ul ð0 < φ ul ≤ 1Þ and φ dl ð0 < φ dl ≤ 1Þ represent the PA efficiency of the users and BS, respectively, and S χ [32] accounts for user distribution and the propagation environment. S χ is defined as where iði ≥ 2Þ describes the path-loss exponent and dð d > 0Þ is a constant. d max and d min are the maximum and minimum radii of the user's uniformly distributed circular region, respectively.
Summing (6) and (7), we have that For the multiuser massive MIMO system, ZF detection and ZF precoding are used to process the uplink and downlink of the system under perfect CSI, respectively. We can conclude that the total system EE is (10) is the circuit power consumption, which is the total power consumed by all analog and digital signal processing. Obviously, the circuit power changes dynamically during the information transmission and can be influenced by many factors. However, P CP is often ignored or treated as a constant [4][5][6] in most previous works which may lead to a certain degree of error in the results obtained. To obtain the optimal system EE value by adjusting the numbers of BS antennas and terminal users, we use a more realistic power consumption model in which the circuit power consumption changes dynamically with the signal processing process. In addition, where P FIX is a constant that stands for the fixed power consumed by site-cooling, baseband processors, analog and digital signaling, etc. [5]. P CD represents the power consumed by the channel encoding and decoding processes and can be quantified as where P COD and P DEC are the power required for channel coding and decoding, respectively. Using the expressions in (2) and (3), we can arrive at P SCE in (11) stands for the power required for channel estimation in both the uplink and downlink of the system, and it can be quantified as [19] where L M and L K are the computational efficiencies of the BS and terminal users, respectively. P TC in (11) is the power consumed by transmitters and receivers [31], which is given by Wireless Communications and Mobile Computing where P SYN is the power consumption of the local oscillator and P BS is the power consumed by running circuit components at the BS. P UE is the power required for running circuit components at the terminal users. P LDB in (11) denotes the power required for transferring the data of the uplink and downlink from the BS to the core network [33]. In addition, where P BT describes the power required for backhaul traffic.
Using the expressions in (2) and (3), we can arrive at P ZFP in (11) is the power consumed by the ZF process and can be calculated as [34] Plugging (13)-(18) into (11) yields To simplify (19), we introduce some constant coefficients as shown in Table 1. Therefore, we can rewrite (19) in the following form, which is shown in (20) 2.1.2. Imperfect CSI. The EE expression for the massive MIMO system is studied in the previous section in the single-cell scenarios with perfect CSI. In this section, we investigate the massive MIMO system EE in the case of imperfect CSI in the single-cell scenarios. As described in [19,35,36], if approximate ZF processing is used under imperfect CSI, the average gross rate is given by where Kτ ul stands for the lengths of the orthogonal pilot sequences in the uplink. Obviously, unlike in the expression in (4), the average gross rate in (21) is more complicated due to the imperfect CSI that causes inevitable interference between terminal users.

Multicell Scenarios.
In this section, a multicell massive MIMO system consisting of J cells is studied. The center of each cell is equipped with M antennas, and K terminal users are uniformly distributed in the cell. In the multicell scenario, CSI is obtainable by channel estimation with pilot sequences at the BS. However, the number of pilot sequences is limited due to the coherence time of the system. The reuse of pilot sequences between multiple cells inevitably causes pilot contamination (PC) [37,38], which can affect the system's average achievable rate. As described in [19], we consider some of the uncertainties of the channel to be noise, and the power consumed by PA is as described in (9). If ZF processing is used, the average gross rate is given in (22)  Coefficients Value

Wireless Communications and Mobile Computing
where I PC = ∑ ℓ∈Q j \fjg I jℓ stands for the total power consumed by PC, and I PC 2 = ðI PC Þ 2 . I = ∑ J l=1 I jℓ is the relative interference between all cells. I jℓ = E xℓk fℓ j ðxℓkÞ/ℓ ℓ ðxℓkÞg stands for the average interference that exists between a terminal user in cell ℓ and the BS in cell j.
Ef⋅g is the expectation operator. ℓ j ðxℓkÞ is the average channel fading from the fixed location to the jth user.

Energy Efficiency Optimization Algorithm
Based on the PSO It can be seen from the previous section that the massive MIMO system EE is related to the numbers of BS antennas (M) and terminal users (K). Therefore, the EE optimization problem under different scenarios can be described as shown in (23) It can be seen from (23) that the expression of the system EE is very complex regardless of whether the situation is a single-cell or multicell scenarios with perfect or imperfect CSI. In particular, the parameters M and K appear in both the numerator and denominator of the EE expression. Consequently, it is difficult to obtain the values of M and K that optimize the EE of the system.
The optimal EE of the system can be obtained by an exhaustive search algorithm, which requires many calculations. An iterative optimization algorithm was used to solve this problem in [19]. However, this algorithm takes a long time and greatly increases the complexity of the algorithm implementation. Moreover, it cannot optimize two parameters at the same time, leading to a result that may not be close to the optimal value. To quickly obtain the optimal EE with low complexity, the PSO algorithm is applied to optimize the EE of the massive MIMO system by adjusting the numbers of BS antennas and terminal users simultaneously.
3.1. The PSO Algorithm. The PSO algorithm, first proposed in 1995, was inspired by the simulation of the foraging process of birds [21]. The core idea of the PSO is as follows: in the PSO algorithm, each particle is a possible solution of the optimization problem and it holds its own position and speed information. The velocity vector of the ith particle in the D-dimensional space is described as Then, the algorithm finds the local optimal location information, while at the same time, the whole particle swarm can also record global optimal location information. The historical optimal value found by the particle itself is P i = ð p i1 , p i2 , ⋯ ⋯ , p iD Þ, and the best selection result from the whole particle swarm can be described as P g = ðp g1 , p g2 , ⋯ ⋯ , p gD Þ. Each particle in the particle swarm adjusts its speed V i and position X i according to the current individual extreme value P i , found by the particle itself, and the current global optimal solution P g shared by the entire particle swarm until the fitness function reaches its maximum value. The speed and position update formulas are as follows [39]: where ωðω > 0Þ is the inertia weight and c 1 and c 2 are two constants that stand for the individual learning factor and social learning factor, respectively. rand ðÞ is a random function in the range ½0, 1. x id and v id are a particle's current location and velocity. p id is the optimal value that particle i has found so far, and p gd is the global optimal value found by all particles. The first part of (24) is the "inertness" part, which describes the effect of the previous velocity. The second part is the "individual" part, which stands for the individual particle's experience. The third part is the "social" part, which describes the communication and cooperation between particles. The PSO algorithm seeks the optimal solution through the cooperation and sharing of information between individuals in the particle swarm. The algorithm is very easy to implement, with few adjusted parameters. Moreover, the PSO algorithm can be applied to solve different practical problems by abstracting the objective function without complex mathematical calculations, and it can quickly acquire the solution that is closest to the optimal value. Based on this, the PSO algorithm is applied to obtain the optimal EE of the massive MIMO system.

PSO Algorithm-Assisted Energy Efficiency Optimization.
In the PSO algorithm, which is applied to optimize the EE of massive MIMO systems, the D-dimensional solution space represents the number of adjustable parameters, that is, the number of BS antennas (M) and the number of terminal users (K). Therefore, we use N D stands for the number of the optimization parameters. The position of Wireless Communications and Mobile Computing the particle matches a possible solution to the optimization problem ðM opt , K opt Þ. The fitness function for this problem is described as in (23), and the value of EE represents the fitness value of the related solution. N P denotes the number of particles. The main steps of the PSO algorithm for the optimization of EE are shown below: The PSO algorithm is applied to optimize the massive MIMO system EE, and the core of the algorithm is to find the accurate fitness function, which is the mathematical expression of the EE as described in (23). Then, like the PSO algorithm, the EE optimization algorithm initializes the particle swarm, updates the speeds and positions of the particles, and updates the global optimal value according to the fitness value until the termination criteria is met. As a result, the optimal EE of the system and the corresponding numbers of BS antennas (M) and terminal users (K) are obtainable. Compared with the algorithm in [19], the algorithm we propose in this paper not only possesses low com-plexity and low time consumption but also obtains better EE performance by simultaneously optimizing two (M and K) parameters.

Simulation Results
In the previous section of this paper, a dynamic power consumption model is applied to obtain the mathematical expression for the EE of the massive MIMO system, which is taken as the fitness function in the PSO algorithm. The numbers of BS antennas (M) and terminal users (K) are used as independent variables to optimize the EE with the PSO algorithm.
The simulation results in this section are used to verify the superiority of the proposed algorithm in optimizing the EE of a massive MIMO system. We provide simulation results with ZF processing under both perfect and imperfect CSI in single-cell scenarios and under imperfect CSI in the 1. Initialize the boundaries of M and K and the parameters N P , N D , ω, c 1 , c 2 2. for each particle i 3.
Initialize the velocity V i and position X i , then set the individual optimal value P i = X i 4. end for 5. Select the largest of the individual optimal values as the global optimal value, that is, the global optimal value P g = max fP i g 6. for i = 1 to N P . 7.
using (24), update the velocity of particle i.

8.
if the velocity exceeds the velocity boundary then 9.
pull it to the velocity boundary 10.
using (25), update the position of particle i.

12.
if the position exceeds the position boundary then 13.
pull it to the position boundary 14.
Update P i and P g . 25.
if termination criterion is satisfied then 32.

Single-Cell Scenarios.
Under the single-cell multiuser massive MIMO system, we study the influence of the numbers of BS antennas and terminal users on the system EE under perfect and imperfect CSI. The simulation results are shown as follows: Figure 2 shows the achievable EE values of the massive MIMO system based on the PSO algorithm and the corresponding values of M and K in the single-cell scenarios with perfect CSI. From Figure 2, we can see that the optimal EE value is 3:074e + 07 bit/Joule, and the corresponding num-bers of BS antennas and terminal users are M = 163 and K = 104. In particular, the running time of the whole optimization algorithm is only 23.485 s. As shown in Table 4, under the same conditions, [19] uses an iterative algorithm to obtain the optimal EE value of 3:07e + 07 bit/Joule when M = 165 and K = 104, and the running time of the algorithm is 617.669 s. [26] uses the ABC algorithm to achieve the optimal EE value of 3:0614e + 07 bit/Joule, and the corresponding numbers of BS antennas and terminal users are M = 166 and K = 106. The running time of the algorithm is 163.032 s. Compared with [19,26], the EE value obtained by the algorithm presented in this work is the best, the number of BS antennas (M) is the smallest and the running time is the shortest. Figure 3 shows the achievable EE values of the massive MIMO system based on the PSO algorithm and the corresponding values of M and K in the single-cell scenarios with imperfect CSI. [26] does not consider the single-cell scenarios with imperfect CSI, but the scenario in [19] is the same as the one considered in this section. Therefore, the simulation results can only be compared with those in [19]. The optimal value of the system EE under imperfect CSI is 2:588e + 07 bit/Joule, which is the same as in [19]. However, the number of BS antennas (M) is 182 and the number of terminal users (K) is 109, and the running time of the algorithm is 50.832 s, while in [19], M = 185 and K = 110 and the running time is 642.018 s. As shown in Table 5, the algorithm proposed in this study can use fewer BS antennas in a shorter amount of time to achieve the same EE performance as in [19].
Comparing Figures 2 and 3, it is clear that the EE performance of the massive MIMO system based on the PSO algorithm in perfect CSI is similar to the result for imperfect CSI. The difference is that the number of BS antennas with perfect CSI is larger than that with perfect CSI. Thus, under perfect CSI, fewer antennas at the BS can be used to obtain better EE.

Multicell Scenarios.
In the multicell massive MIMO system, the multiplexing of pilot sequences between cells        inevitably results in PC, which affects the EE of the system. As described in [17], the highest EE can be obtained by using the largest pilot reuse factor (τ ðulÞ = 4). Therefore, we consider τ ðulÞ = 4 in the multicell massive MIMO system. The simulation result is shown in Figure 4, and the results of the comparison with [19] are shown in Table 6. Figure 4 shows the achievable EE values of the massive MIMO system based on the PSO algorithm and the corresponding values of M and K in the multicell scenarios with imperfect CSI. From Figure 4, it is seen that the optimal EE value is 7:562e + 06 bit/Joule with corresponding values of M = 115 and K = 37, and the running time of this algorithm is 50.449 s in this algorithm. In [19], the optimal EE, the corresponding optimal M and K, and the running time are 7.58 Mbit/Joule, 123 and 40, and 667.859 s, respectively. As shown in Table 6, compared with [19], although the EE value obtained by this algorithm is slightly lower, we also use fewer BS antennas. Most importantly, the running time of the algorithm presented in this work is far less than that of the iterative algorithm in [19].

Conclusions
In this paper, we proposed an algorithm based on PSO to study how to select the numbers of BS antennas (M) and terminal users (K) to maximize the EE in a single-cell massive MIMO with perfect and imperfect CSI, and a multicell scenarios with imperfect CSI. The results reveal that the algorithm presented in this paper possesses the lowest complexity and the highest optimal EE value in a singlecell scenario with perfect CSI when compared with the iterative algorithm [19] and ABC algorithm [26]. In a single-cell scenario with imperfect CSI, the proposed algorithm in this paper can achieve the same optimal EE value as that obtained by the iterative algorithm in [19], but the time used by this algorithm is only one-twelfth of that required for the iterative algorithm. In a multicell scenario with imperfect CSI, the optimal value of the EE of the system achieved by this algorithm is slightly lower than that obtained by the iterative algorithm in [19], but the time consumed by this algorithm is only one-thirteenth of that required for the iterative algorithm.

Data Availability
The underlying data supporting the results of this study can be found by contacting with the authors.

Conflicts of Interest
The authors declare that there is no conflict of interest regarding the publication of this paper.