An Optimal Joint User Association and Power Allocation Algorithm for Secrecy Information Transmission in Heterogeneous Networks

In recent years, heterogeneous radio access technologies have experienced rapid development and gradually achieved effective coordination and integration, resulting in heterogeneous networks (HetNets). In this paper, we consider the downlink secure transmission of HetNets where the information transmission from base stations (BSs) to legitimate users is subject to the interception of eavesdroppers. In particular, we stress the problem of joint user association and power allocation of the BSs. To achieve data transmission in a secure and energy efficient manner, we introduce the concept of secrecy energy efficiency which is defined as the ratio of the secrecy transmission rate and power consumption of the BSs and formulate the problem of joint user association and power allocation as an optimization problem which maximizes the joint secrecy energy efficiency of all the BSs under the power constraint of the BSs and the minimum data rate constraint of user equipment (UE). By equivalently transforming the optimization problem into two subproblems, that is, power allocation subproblem and user association subproblem of the BSs, and applying iterative method and Kuhn-Munkres (K-M) algorithm to solve the two subproblems, respectively, the optimal user association and power allocation strategies can be obtained. Numerical results demonstrate that the proposed algorithm outperforms previously proposed algorithms.


Introduction
In the past few decades, radio access technologies have experienced rapid development.Various types of radio access networks, such as cellular networks, wireless local area networks (WLANs), and worldwide interoperability for microwave access (WiMAX), have been deployed widely to provide Internet access services to users.In certain regions, these heterogeneous access technologies may coexist, resulting in heterogeneous networks (HetNets) [1], in which user equipment (UE) with multiple interfaces is allowed to associate with the base stations (BSs) of different networks in order to achieve information interaction.The design of user association schemes in HetNets is of particular importance as different user association strategies may result in various user quality of service (QoS) as well as network transmission performance due to the different channel characteristics between UE and BSs and the heterogeneity of access networks especially in terms of available network resource and resource management schemes.
In recent years, some research works have considered user association or cell association problem in HetNets.In [2], the authors study the cell association problem of a multitier HetNet and propose a unified distributed cell association algorithm which maximizes the sum utility of long-term rate and minimizes global outage probability.In [3], a distributed optimal user association algorithm is proposed for HetNets which maximizes the utilization of BSs.The authors in [4] stress the user association problem of a HetNet consisting of low power pico-BSs (PBSs) and high power macro-BSs (MBSs).Aiming at minimizing system blocking rate as well as offering interference-free communication to the edge UE of the PBSs, the authors formulate the joint optimization problem of user association and almost blank subframes (ABS) as 2 Wireless Communications and Mobile Computing a combinatorial optimization problem and propose to solve the optimization problem based on Hungarian matching algorithm and iterative algorithm.The authors in [5] examine the impacts of mobile backhaul networks on fiber-wireless enhanced LTE-A HetNets and propose a backhaul-aware user association algorithm to achieve intercell load balancing and network performance enhancement in terms of transmission delay and service block probability.
In the case that user association strategies have been designed for HetNets, the transmit power of wireless transmitters, that is, BSs or UE, plays an important role in affecting the transmission performance of users.To achieve reliable and efficient user transmission, optimal power allocation strategies are highly desired.References [6,7] stress the power allocation problem of HetNets.The authors in [6] study the downlink power allocation problem of HetNets consisting of femto-BSs (FBSs) and MBSs and formulate the power allocation problem of the FBSs as a noncooperative game model under the constraint of the outage probability of macro-UE (MUE).Through solving the Nash equilibrium solutions of the game model, the transmit power strategies can be obtained.In [7], the authors jointly consider time domain and power domain optimization of a two-tier macro-pico-HetNet.Time domain performance optimization is achieved by applying an adaptive ABS configuration scheme which dynamically matches network resources to the real-time load of the network.To further enhance network performance and achieve the performance tradeoff between the two tiers, a utility function maximization based power control and scheduling scheme is proposed.
References [8][9][10] jointly consider user association and resource allocation problem in HetNets.The authors in [8] consider the downlink transmission in HetNets and propose a two-stage joint user association and power allocation algorithm which maximizes the minimum data rate of the UE.Reference [9] considers the joint design of transmit power and user association strategies in a downlink HetNet.A utility function defined as the logarithm function of user data rate is maximized to obtain the optimal power allocation and user association strategy.The authors in [10] study user association and resource allocation problem of scalable video coding multicast transmission over HetNets and propose a similarity-based negotiation algorithm to obtain the optimal user association strategies and a dynamic programming based algorithm to optimally design the transmission profile of video signals.
In previous research works [8][9][10], to maximize network throughput or the formulated utility function, the maximum transmit power should be applied in general.However, this may result in large power consumption and low energy efficiency, which are highly undesired.To stress the tradeoff between user transmission performance and power consumption, the energy consumption and the energy efficiency of HetNets should be considered in designing resource allocation schemes.
References [11][12][13][14][15][16] investigate the energy consumption issues in HetNets.In [11], the authors aim at minimizing the power consumption of an orthogonal frequency-division multiplexing (OFDM) based HetNet under the data rate constraints of the users.The authors in [12] investigate the energy efficient BS deployment and transmit power allocation strategies for both macrocells and femtocells in HetNets.A network energy consumption minimization problem is formulated under the constraint of coverage performance, and the optimal deployment density and the transmit power of MBSs and FBSs are obtained through solving the optimization problem.In [13], the authors consider a two-tier HetNet consisting of macrocells and small cells and propose to deploy the small cells around the edge of the macrocells.To increase the energy efficiency and spectral efficiency while reducing cochannel interference, the authors propose a location-based power control mechanism for small cell UE.
In [14], the authors present an architecture for multimedia transmission over HetNets and propose an energy efficient multimedia transmission scheme to optimize the energy efficiency of the BSs by exploiting user behavior characteristics.Reference [15] considers a downlink multiuser orthogonal frequency-division multiple access (OFDMA) system and proposes an optimal power and subcarrier allocation scheme to maximize the sum energy efficiency of users under the total transmit power constraint.The authors in [16] consider spectrum handoff and resource allocation problem of secondary users (SUs) in heterogeneous cognitive radio networks and propose an optimal joint handoff channel selection and transmit power allocation scheme which aims at maximizing the energy efficiency of all the SUs.
In previous research works [2][3][4][5][6][7][8][9][10][11][12][13][14][15][16], secure communication environment is considered where no information eavesdropping exists.However, as the network architecture of HetNets is more open and diverse compared to traditional cellular systems, information exchange in HetNets is more susceptible to eavesdropping; therefore, the problem of secure information transmission becomes extremely important in HetNets.References [17][18][19] study secure communication problem in HetNets.Reference [17] studies physical layer security in a multitier HetNet where BSs, legitimate users, and eavesdroppers are all randomly located.The authors propose an access threshold-based secrecy mobile association policy in which users are associated with the BSs offering the maximum received signal power.
In [18], the authors consider a HetNet scenario where a number of eavesdroppers tend to eavesdrop on the information of legitimate users.A resource allocation algorithm which jointly considers secure information transmission, cross-tier interference, and optimal power and subcarrier allocation is proposed in order to maximize the achievable secrecy sum rate of the network.The authors in [19] investigate secure communications in a two-tier downlink HetNet comprised of one macrocell and multiple femtocells.Assuming that an eavesdropper attempts to eavesdrop on the information of MUE, the authors propose a secure transmit beamforming scheme to maximize the secrecy rate of the MUE.
While secure information transmission in HetNets has been considered in [17][18][19], user association and resource allocation issues have not been studied extensively.In particular, in the case where there exist eavesdroppers who aim at eavesdropping on user information, traditional optimal user association and resource allocation strategies such as user data rate maximization based algorithm may not be feasible, as high data rate may require large transmit power, resulting in severer information leakage at the eavesdroppers, which is highly undesired.
In our previous work in [20], we study user association and power allocation problem for HetNets with eavesdroppers and propose an optimal user association and transmit power strategy for multiuser case.In this paper, we extend our previous work in [20].Jointly considering user association and power allocation problem of HetNets where the information transmission from BSs to legitimate users is subject to the interception of eavesdroppers, we propose a joint radio resource management architecture, based on which a joint user association and power allocation algorithm is designed for both single user case and multiuser case.Aiming at achieving data transmission in a secure and energy efficient manner, the concept of joint secrecy energy efficiency of the network is introduced and is defined as the ratio of secrecy transmission rate and the power consumption of the BSs.An optimization problem is formulated which maximizes the joint secrecy energy efficiency under the power constraint of the BSs and the minimum data rate constraint of the UE.By transforming the optimization problem equivalently into two subproblems, that is, power allocation subproblem of each BS-UE pair and user association subproblem for all the users, and applying iterative method and Kuhn-Munkres (K-M) algorithm to solve the two subproblems, respectively, the optimal user association and transmit power allocation strategies can be obtained.
The major contributions of this paper are summarized as follows: (i) We study user association and power allocation problem of HetNets which consists of multiple access networks.To achieve joint resource management and performance enhancement of various access networks, we propose a joint radio resource management architecture, based on which a joint user association and power allocation algorithm is designed.(ii) User association problems or resource allocation problems in HetNets have been studied separately in previous works [2][3][4][5][6][7].In this paper, we jointly consider user association and power allocation problem in HetNets and design joint optimal strategies so that the overall performance of the networks can be maximized.(iii) While most of the previous works [2][3][4][5][6][7][8][9][10][11][12][13][14][15][16] consider secure communication environment in HetNets, it is highly possible that the information transmission from BSs to UE is eavesdropped on by eavesdroppers.
In this paper, we study the problem of information transmission in HetNets where eavesdroppers tend to eavesdrop on user information.To stress the secure transmission requirements and the tradeoff between transmission data rate and power consumption, we introduce the concept of secrecy energy efficiency of BSs.Jointly considering the overall network performance, we examine the sum secrecy energy efficiency of all the BSs and formulate the joint user association and power allocation problem in HetNets as a secrecy energy efficiency maximization problem.(iv) Since the formulated optimization problem is a mixed-integer nonlinear optimization problem which cannot be solved conveniently, we transform the original optimization problem equivalently into two subproblems, that is, power allocation subproblem and user association subproblem, which can then be solved by applying iterative method and K-M algorithm, respectively.
The rest of the paper is organized as follows.Section 2 describes the system model considered in this paper and the proposed joint radio resource management architecture.In Section 3, we present the optimization problem formulation.
The solution of the optimization problem is discussed in Section 4. In Section 5, we present the simulation results and discussions on the computation complexity of the algorithms.Finally, we conclude this paper in Section 6.

System Model and the Proposed Joint Resource Management Architecture
In this section, we describe the system model considered in this paper and propose a joint resource management architecture.

System Model.
In this paper, we consider the downlink transmission of HetNets, which consist of multiple overlapping access networks.The UE located in the area of the HetNets may associate with one of the networks for information interaction.We assume that each network is assigned a portion of spectrum and no spectrum sharing between networks is allowed.Within each network, orthogonal resource blocks are allocated to various UE; thus, no transmission interference exists among UE in the same network.We consider the scenario that a number of eavesdroppers located in the HetNets intend to eavesdrop on user information.Due to the heterogeneity of the access networks especially in terms of transmission schemes and resource allocation strategies, each eavesdropper can only eavesdrop on the information of the UE associated with one particular network.For convenience, we assume that each eavesdropper is associated with one network and thus is capable of eavesdropping on user information when the users access the same network.
We denote the number of access networks and the amount of UE by  and , respectively.Without loss of generality, we assume that only one BS is deployed in each network.For simplicity, the BS of the th network is denoted as BS  , 1 ≤  ≤ , and the th UE is denoted as UE  , 1 ≤  ≤ .We further assume that each UE can only associate with one BS and each BS can only serve one UE on certain time-frequency resource block.
In this paper, we assume the received signal of UE  from BS  can be expressed as where  , and  , are, respectively, the transmitted data symbol and the transmit power of BS  when transmitting to UE  , ℎ , represents the channel gain of the link from BS  to UE  , ℎ , =  ,  , ℎ 0 , , where  , and  , denote the path loss and shadowing attenuation of the link between BS  and UE  , respectively, ℎ 0 , denotes the slow fading channel coefficient of the link, which is modeled as a Rayleigh distributed random variable, and  , is the additive white Gaussian noise (AWGN) with zero mean and variance  2 .
Similarly, in the case where UE  is associated with BS  , the received signal of the eavesdropper within the th network can be expressed as where ℎ   denotes the channel model of the link between BS  and the eavesdropper, ℎ   =       ℎ ,0  , where    and    denote, respectively, the path loss and shadowing attenuation of the link between BS  and the eavesdropper, and ℎ ,0  denotes the slow fading channel coefficient of the link, which follows Rayleigh distribution.

The Proposed Joint Resource Management Architecture.
Due to the heterogeneity of various access networks, the convenient information interaction and resource management of users within different networks may not be feasible.To achieve efficient information interaction and resource management within each access network and between different networks, we propose a joint resource management architecture in this paper.
Figure 1 shows the proposed joint resource management architecture, in which three types of functional entities, that is, global resource management entity (GRME), local resource management entity (LRME), and user resource management entity (URME), are introduced to tackle the dynamic information of the integrated networks and to conduct joint user association and power allocation of BSs.The major roles and functions of GRME, LRME, and URME are as follows.
GRME.GRME is a functional module being deployed out of the access networks.Through interacting with the associated LRMEs, the GRME is capable of receiving network and user state information, based on which the proposed user association and power allocation algorithm is conducted and the obtained optimal strategies are sent to the LRMEs.LRME.LRME is a functional module being deployed in each access network, for instance, being integratively designed in the BS of networks.One LRME is responsible for collecting and managing the network and user status information and resource management strategies of the associated network through interacting with corresponding URMEs and the GRME.More specifically, the LRMEs collect and store network status information periodically or based on eventtrigger mode, receive user status information from the associated URMEs, and then send the collected information to the GRME.In addition, through interacting with the GRME, the LRMEs receive the optimal user association and power allocation strategies, conduct the corresponding operations, and forward the optimal strategies to the associated URMEs.URME.URME is a functional module embedded in each UE.URMEs are responsible for collecting and storing user status information, including channel state information (CSI), device characteristics, and service requirements.Through interacting with the associated LRMEs, URMEs send their collected information to the network and receive the joint user association and power allocation strategies.
It should be mentioned that the information interaction between GRME, LRMEs, and URMEs can be performed over a common control channel.Efficient random access control schemes and user scheduling schemes should be designed to guarantee the performance of information interaction between various functionality entities.In this paper, we assume that efficient information interaction between GRME, LRMEs, and URMEs can be achieved and design joint user association and power allocation algorithm based on the obtained information.

Optimization Problem Formulation
In this section, we introduce the concept of secrecy energy efficiency and formulate the joint user association and power allocation problem of the HetNets as a sum secrecy energy efficiency maximization problem.

Objective Function. The sum secrecy energy efficiency of the BSs can be expressed as
where  , ∈ {0, 1} denotes the binary association variable between BS  and UE  and  , represents the secrecy energy efficiency of BS  when associating with UE  , which can be expressed as where  sec , denotes the secrecy transmission rate of the link between BS  and UE  and  , and  cir denote, respectively, the transmit power and the circuit consumption power of BS  when transmitting to UE  .Without loss of generality, we assume that the circuit consumption power of the BSs is a constant in this paper. sec , in (4) can be expressed as [21] where   , denotes the data rate of the link between BS  and UE  and   , denotes the data rate of the eavesdropper when eavesdropping on UE  in the th network.  , can be expressed as where   denotes the transmission bandwidth of BS  and  2 denotes the noise power, which is assumed to be a constant in this paper.  , in (5) can be calculated as

Optimization Constraints.
In the HetNets, UE with various service requirements may pose different QoS constraints on serving BSs.In this paper, stressing service sensitiveness to transmission rate, we assume that UE may have different data rate requirements.In addition, due to hardware and signal processing constraints, the transmit power of the BSs also should be subject to a maximum power constraint.In this subsection, we describe the optimization constraints of the secrecy energy efficiency maximization problem.
Through solving the above optimization problem, we can obtain the optimal joint user association and power allocation strategies.

Solution of the Optimization Problem
In this section, we apply optimization tools and solve the problem formulated in (12).To solve the optimization problem, we start from a simple single user case, in which the number of users is assumed to be 1; that is,  = 1.We then extend the single user case to a more general multiuser case, in which the number of users is greater than 1; that is,  > 1.

Solution of the Optimization Problem: Single User Case.
In this subsection, we consider the case where only one user needs to associate with one BS and design joint user association and power allocation scheme for the user.For convenience, we refer to the user as the first user; that is, we set  = 1 in the formulas derived in previous sections.
According to (4), the secrecy energy efficiency of the user when associating with BS  , denoted by  ,1 , can be expressed as To achieve high energy efficiency, the UE may prefer accessing BS  which offers the maximum secrecy energy efficiency among all the available BSs.However, it can be seen from ( 13) that the secrecy energy efficiency varies with the transmit power  ,1 , and thus it is difficult to examine and compare the secrecy energy efficiency of various BSs.To deal with this problem, we propose a two-step algorithm which consists of both power allocation subalgorithm and user association subalgorithm.More specifically, we first conduct optimal power allocation subalgorithm for BS  , that is, optimally designing  ,1 so that the maximum secrecy energy efficiency denoted by  * ,1 can be achieved, 1 ≤  ≤ , and then apply optimal user association subalgorithm, that is, selecting the optimal BS which offers the maximum  * ,1 .For BS  , the optimal power allocation problem can be formulated as max For a given range of  ,1 , that is, 0 <  ,1 ≤  max  , the optimal secrecy energy efficiency of the user when associating with BS  , that is,  * ,1 , can be obtained through solving the above problem via numerical method or optimization techniques (as discussed in Section 4.2).Given  * ,1 , we can then conduct the optimal user association subalgorithm, which simply reduces to an optimal BS selection problem.Through solving the optimization problem, the optimal BS, denoted by BS *  , which offers the maximum  * ,1 can be selected:

Solution of the Optimization Problem: Multiuser Case.
From Section 4.1, we can see that, for single user case, the optimal joint user association and power allocation strategies can be obtained through optimizing the transmit power of all the BSs and then selecting the optimal BS which offers the maximal secrecy energy efficiency.In the case where multiple users tend to associate BSs, allowing users to select their optimal BSs may not be feasible as resource competition among users exists and multiple users may prefer accessing one BS, which may result in serious interference and performance deterioration in turn.
In this subsection, we consider multiuser case and solve the optimization formulated in (12).The optimization problem formulated in ( 12) is a mixed-integer nonlinear optimization problem, the solution of which is difficult to obtain conveniently.Indeed, it can be shown that the original optimization problem can be equivalently transformed into two subproblems, that is, power allocation subproblem and user association subproblem.In particular, the power allocation subproblem is defined as, for given user and BS association pair, maximizing the secrecy energy efficiency in terms of the transmit power of the BS, while user association subproblem is defined as selecting the optimal BSs for all the users so that the sum secrecy energy efficiency of all the BSs can be maximized.By solving the two subproblems sequentially, the optimal user association and power allocation strategies can be obtained.

Optimal Power Allocation Subproblem.
In this subsection, we assume that all the users have associated with the BSs, and then we solve the optimal power allocation subproblem.Assuming that UE  has associated with BS  , that is,  , = 1, 1 ≤  ≤ , 1 ≤  ≤ , the optimal power allocation subproblem for BS  can be formulated as follows: The optimization problem formulated in ( 16) is a nonconvex nonlinear fractional program, which cannot be solved conveniently using traditional optimization tools.In this subsection, we show that, through defining additional variables and conducting some mathematical manipulations, the formulated optimization problem can be solved iteratively.Within each iteration, a convex optimization problem can be formulated and solved using Lagrange method [22].
From the above optimization problem, it can be observed that, for given energy efficiency  , , the optimization problem becomes a convex optimization problem with the only optimization variable being  , , and thus it can be solved using traditional optimization methods to obtain the locally optimal transmit power of BSs, based on which the secrecy energy efficiency  , can be updated.Repeating the process until the convergence condition is met, we can obtain the globally optimal energy efficiency and transmit power solution.
The iterative process described above can be implemented through an iterative algorithm, which proceeds as follows.
Starting from an initial value of  , , we can obtain the locally optimal  * , through solving the optimization problem formulated in (19), and then  * , can be calculated based on (17).For the given  * , , the power allocation subproblem can be resolved to obtain updated  *  , and the process continues until the convergence condition, that is,  sec , ( * , ) −  , ( * , +  cir ) ≤  1 , is met, where  1 denotes the maximum tolerance.The proposed algorithm is summarized in Algorithm 1 and the convergence of the algorithm can be guaranteed [23].
For given  , , the optimization problem formulated in (19) For a given set of Lagrange multipliers {, }, we can obtain the locally optimal power allocation strategy: where The Lagrange multipliers  and  in ( 23) can be updated based on the gradient method; that is, where  1 and  2 are step sizes.The proposed Lagrange dual method based power allocation subalgorithm is summarized in Algorithm 2.

User Association
For given  * , ,  sec , ( * , )/( * , +  cir ) is a constant; therefore, the optimization problem formulated in ( 12) is equivalent to selecting the optimal  , subject to user association constraints, which can be expressed as the following optimal user association subproblem: max The optimization model formulated in ( 26) is a constrained integer optimization problem, which requires relatively high computation complexity.However, it can be observed that, given the constraints on user association, the optimization problem is equivalent to an optimal matching problem in the bipartite graph theory, which can then be solved based on the classical algorithms such as K-M algorithm [24].
The following are some definitions and a theorem related to K-M algorithm.
Complete Bipartite Graph.Given a graph  = (; ), where  denotes a set of vertices and  denotes a set of edges (1) Set the maximum number of iterations  max and the maximum tolerance  1 (2) Set  , = 0 and the iterative index  = 0 (3) repeat (4) For a given  , , solve power allocation subproblem to obtain the locally optimal power allocation strategy  * , (5)  end if (12) until Convergence = true or  =  max Algorithm 1: Iterative algorithm based secrecy energy efficiency maximization.
(1) Set the maximum number of iterations  max and the maximum tolerance  2 (2) Initialize Lagrange multipliers , repeat (4) Calculate the power allocation strategy Update the Lagrange multipliers: Theorem 1.If  is a feasible vertex labeling of  and  is an optimal matching of  to  with  ⊆   , then  is an optimal assignment from  to .Thus, the problem of finding an optimal matching in a complete bipartite graph reduces to the problem of finding a feasible vertex labeling of which the equality subgraph contains an optimal assignment from  to .
Applying K-M algorithm to solve the user association subproblem formulated in (26), a weighted bipartite graph  = ( 1 ,  2 ; ) can be constructed, where the set of vertices  1 represents the collection of BSs, that is,  1 = [BS 1 , BS 2 , . . ., BS  ], and the set of vertices  2 represents the collection of UE, that is,  2 = [UE 1 , UE 2 , . . ., UE  ]; the weight of the edge connecting BS  and UE  is defined as The steps for solving the optimal user association subproblem can be summarized as follows: (1) Define an initial feasible vertex labeling ().
(2) Given (), obtain   from  and determine a maximum matching  of .
(3) If  is an optimal matching of , the optimization problem formulated in ( 26) is solved and the optimal user association strategy can be obtained correspondingly.
(4) If  is not an optimal matching of , we select a vertex  ∈  1 , provided that  has not been allocated, and set  = {},  = Φ.
Through conducting the above process iteratively, an optimal matching of  can be obtained corresponding to the optimal user association strategy.

Simulation Results.
In this section, we examine the performance of the proposed joint user association and  power allocation algorithm and compare the algorithm with previously proposed algorithms via simulation.In the simulation, we consider a HetNet scenario consisting of multiple overlapping access networks.We assume that all the UE is randomly located in a rectangular region with the size being 100 × 100.The number of BSs and amount UE are chosen from 3 to 5. Other parameters used in the simulation are summarized in Table 1 [25].The simulation results are averaged over 1000 independent adaptation processes where each adaptation process involves different positions of UE and eavesdroppers.
Figure 2 shows the secrecy energy efficiency of the BSs versus the number of iterations obtained from the proposed algorithm.The maximum power of the BSs, that is,  max , is chosen as 0.2 W in plotting the figure.It can be observed that the algorithm converges within a small number of iterations which demonstrates the effectiveness of the proposed algorithm.For comparison, we examine the results obtained for different circuit power.It can be seen from the figure that the secrecy energy efficiency decreases as the circuit power increases.
Figure 3 shows the secrecy energy efficiency versus the maximum transmit power of BSs, that is,  max , for different number of BSs.To plot the curves, we set  cir as 0.05 W and assume that  max is the same for all the BSs.For given  max , we conduct the proposed scheme and the scheme proposed in [9], respectively.Based on the obtained user association and power allocation strategies, the secrecy energy efficiency of the BSs can be examined and is plotted in the figure .It can be seen from the figure that, for small  max , the secrecy energy efficiency increases with the increase of Proposed scheme, M = 3 Scheme in [9], M = 3 Proposed scheme, M = 4 Scheme in [9], M = 4 Proposed scheme, M = 5 Scheme in [9], M = 5  max , indicating that a higher maximum power threshold is desired for achieving the maximum secrecy energy efficiency.However, as  max reaches a certain value, the secrecy energy efficiency obtained from the proposed scheme becomes a constant which no longer varies with the increase of  max .This is because the transmit power being less than  max has resulted in the optimal secrecy energy efficiency.However, the secrecy energy efficiency obtained from the scheme proposed in [9] begins to decrease after reaching the maximum point.The reason is that the scheme proposed in [9] aims at maximizing the utility function defined as the logarithm function of user data rate, which requires larger transmit power, resulting in lower energy efficiency.Comparing the curves obtained from the two algorithms, we can see that the proposed scheme outperforms the schemes proposed in [9] especially for relatively large  max .It can also be seen from the figure that the secrecy energy efficiency increases as the number of BSs increases.This is because the amount of available network resource increases with the increase of the number of BSs, thus resulting in better secrecy energy efficiency performance.
Figure 4 shows the secrecy energy efficiency versus the maximum transmit power of BSs, that is,  max , for different circuit power.The number of BSs is chosen as 4 in examining the results.For comparison, we plot the secrecy energy efficiency obtained from our proposed algorithm and the algorithm proposed in [9].It can be seen from the figure that, for a fixed  cir , when  max is smaller, the secrecy energy efficiency increases with the increase of  max for both algorithms.As  max increases, the secrecy energy efficiency obtained from our proposed algorithm reaches a maximum value, which will not change with the further increase of  max ; however, the secrecy energy efficiency obtained from the algorithm proposed in [9] begins to decrease after reaching the maximum value.Comparing the secrecy energy efficiency obtained for different circuit power consumption, we can see that the secrecy energy efficiency decreases with the increase of circuit power consumption.
Figure 5 depicts the secrecy energy efficiency versus the maximum transmit power of BSs.Different noise power is considered in examining the performance.The number of BSs is chosen as 4 and  cir is chosen as 0.05 in plotting the figure.It can be seen from the figure that the secrecy energy efficiency decreases with the increase of noise power.For a fixed noise power, the curves of secrecy energy efficiency versus  max of BSs are very similar to those in Figures 3  and 4. Comparing the results obtained from our proposed algorithm and the algorithm proposed in [9], we can see that our proposed scheme outperforms the one proposed in [9].
From Figures 3-5, we can see that, for small  max , the secrecy energy efficiency obtained from our proposed algorithm and the algorithm proposed in [9] is very similar.This is because, for small  max , larger transmit power results in larger secrecy data rate and larger secrecy energy efficiency in turn; thus, maximizing secrecy energy efficiency is equivalent to maximizing secrecy data rate in this case.For relatively large  max , to maximize secrecy energy efficiency, the optimal transmit power and the corresponding optimal secrecy energy efficiency can be obtained which will not change with the increase of  max .On the other hand, the algorithm proposed in [9] aims at maximizing the data rate, which requires the maximum transmit power, thus resulting in smaller energy efficiency.Hence, we can see that, for large Proposed scheme, Pcir = 0.05 Scheme in [9], Pcir = 0.05 Proposed scheme, Pcir = 0.1 Scheme in [9], Pcir = 0.1 Proposed scheme, Pcir = 0.15 Scheme in [9], Pcir = 0.15  max , our proposed algorithm outperforms the algorithm proposed in [9].
In Figure 6, we examine the performance of different user association schemes and plot the secrecy energy efficiency versus the maximum transmit power of BSs.The number of BSs is chosen as 3 and  cir is set as 0.05 W in the simulation.To plot both curves, we first apply secrecy energy efficiency maximization based power allocation scheme to the BSs, and then for given optimal power allocation strategies, we conduct both the proposed K-M algorithm based user association scheme and random user association algorithm.Comparing the results obtained from the two schemes, we can see that the proposed algorithm offers better performance in comparison with the random user association algorithm.This is because our proposed algorithm aims at maximizing the secrecy energy efficiency, while random user association algorithm determines user association strategies randomly and thus cannot guarantee the optimal performance of the network.

Discussions.
In this paper, we formulate the joint user association and power allocation problem in HetNets as a secrecy energy efficiency maximization problem.To solve the formulated optimization problem, we consider both single user case and multiuser case.In this subsection, we examine the computation complexity of the proposed algorithm.

Single User
Case.For single user case, the solution to the optimization problem reduces to a two-step process involving power allocation subproblem of BS-UE pairs and user association subproblem.As the computation complexity required for solving the optimal transmit power of each BS-UE pair is relatively small and the number of pairs, that is, the number of BSs considered in this paper, is also small, we can expect the computation complexity required for the algorithm to be relatively small.

Multiuser Case.
To solve the formulated secrecy energy efficiency maximization problem for multiple users, we transform the original optimization problem equivalently into two subproblems, that is, power allocation subproblem and user association subproblem, which can then be solved by applying iterative method, Lagrange method, and K-M algorithm.
The computation complexity of solving the two subproblems can be analyzed as follows.To solve the power allocation subproblem, we first transform the nonlinear fractional problem into a convex problem and then solve the optimal secrecy energy efficiency iteratively (Algorithm 1).Within each iteration, we assume that the secrecy energy efficiency, that is,  , , is given and apply Lagrange method to solve the optimal transmit power (Algorithm 2).As the number of iterations in Algorithm 1 is  max and the number of iterations in Algorithm 2 is  max , the computation complexity required for solving the optimal secrecy energy efficiency of each BS-UE pair is ( max  max ).From the simulation results shown in Figure 2, we can see that the iteration number required to achieve the convergence of the algorithm is relatively small, and hence the total computation complexity required is also small.To solve the optimal user association subproblem, we propose to apply K-M algorithm.As the number of BSs and amount of UE are, respectively,  and , it can be proved that the computation complexity of the algorithm is (min(, )).

Conclusion
In this paper, we jointly study user association and power allocation problem for the downlink transmission in HetNets where the information transmission from BSs to legitimate users is subject to the interception of eavesdroppers.To achieve data transmission in a secure and energy efficient manner, the concept of sum secrecy energy efficiency is introduced and the problem of joint user association and power allocation is formulated as a constrained sum secrecy energy efficiency maximization problem.We solve the formulated optimization problem for both single user case and multiuser case.For both cases, through transforming the optimization problem equivalently into two subproblems, that is, power allocation subproblem and user association subproblem, and applying iterative method and K-M algorithm to solve the two subproblems, respectively, the optimal user association and transmit power allocation strategies are obtained.Numerical results demonstrate that the proposed algorithm offers higher secrecy energy efficiency compared with previously proposed algorithms.

Figure 2 :
Figure 2: Secrecy energy efficiency versus the number of iterations.

Figure 3 :
Figure 3: Secrecy energy efficiency versus maximum transmit power (different number of BSs).

Figure 5 :
Figure 5: Secrecy energy efficiency versus maximum transmit power (different noise power).

Figure 6 :
Figure 6: Secrecy energy efficiency versus the maximum transmit power (different user association schemes).
3.2.1.Secrecy Data Rate Constraint.Let  sec  denote the secrecy data rate of UE  , 1 ≤  ≤ ; we can express  sec In this paper, we assume that each user has a minimum data rate requirement.Let  min  denote the minimal secrecy data rate requirement of UE  ; we can express the secrecy data rate constraint of UE  as permissible transmit power of BS  , 1 ≤  ≤ , the transmit power of BS  should be less than  max 3.2.2.Maximum Power Constraint.In general, the BSs of the HetNets may have to meet a maximum transmit power constraint.Denoting  max  as the maximum  ∑ =1  , ≤ 1,  ∑ =1  , ≤ 1.  s.t.C1:  , ≥ 0, C2:  , ≤  max  , C3:  sec  ≥  min  , C4:  , ∈ {0, 1} , Without loss of generality, we denote  * , as the maximum secrecy energy efficiency of BS  when serving UE  ; that is, , , ,  sec , ( , ) −  , ( , +  cir ) s.t.C1∼C3 in (12) .
if  sec , ( * , ) −  , ( * , +  cir ) ≤  1 pairs of vertices, if the set  can be divided into two disjoint and nonempty sets,  and , that is,  =  ∪  and  ∩  = Φ, where Φ denotes the empty set, every edge in  connects one vertex in  to another vertex in , and no edge connects two vertices of the same set, we call  a complete bipartite graph.
until Convergence = true or  =  max Algorithm 2: Lagrange dual method based power allocation algorithm.connecting Maximum Matching.A matching  of graph  = (; ) is defined as a subset  ⊆  which meets the condition that ∀ , ,    ,  ∈ ,  , and    ,  are not adjacent in .The size of a matching , denoted by ||, is defined as the number of edges contained in .A matching  is called a maximum matching if, for any other matching   of , the condition |  | ≤ || holds.Equality Subgraph.If  is a feasible vertex labeling, let   denote a subgraph of ; if the condition () + () = (, ) holds, then   is called the equality subgraph of  with respect to .