A Coalitional Formation Game for Physical Layer Security of Cooperative Compressive Sensing Multi-Relay Networks

Cooperative relaying is an effective technology to improve the capacity of physical-layer security, in which the relay helps forward the received signal to the destination. In this paper, a cooperative compressive sensing and amplify-and-forward (CCS-AF) scheme, which combines the compressive sensing theory and amplify-and-forward strategy, is proposed to increase the secrecy capacity. To optimize the secrecy performance, a coalition formation algorithm based on coalitional game theory of optimal relay selection is proposed to maximize the secrecy capacity. Different to maximizing the individual utility based on the traditional pareto order, the max-coalition order rule is newly defined to guide the coalitional formation. Simulation results indicate that with the proposed algorithm, part of the relays could form a coalition to forward the information and the proposed algorithm could significantly improve the secrecy capacity of cooperative multi-relay networks.

(3) A coalitional formation algorithm for multi-relay selection is proposed to find the optimal coalition structure to achieve the maximum secrecy capacity. The simulation results show that the proposed algorithm can improve the secrecy capacity compared with the circumstance with all relays. Furthermore, the distributed algorithm confers to the relays self-organization and self-optimization properties.
The rest of this paper is organized as follows: In Section 2, a cooperative network model with multi-user and multi-relay is proposed based on CCS-AF. A brief introduction of coalitional game is shown in Section 3, and the coalition formation algorithm is introduced in Section 4. The results of simulations are provided and analyzed in Section 5. Finally, conclusions are drawn in Section 6.

System Model
In this section, we model a cooperative system with multiple sources and multiple relays based on CS. As shown in Figure 1, there are N sources (S 1 , . . . , S N ), M relays (R 1 , . . . , R M ), Z eavesdroppers (E 1 , . . . , E Z ), and one destination (D; M < N) in the network. The transmission period is divided into two time slots. In the first time slot, the source nodes send their own information to the relay nodes simultaneously. In the second time slot, some or all of the relays will be selected to amplify and forward (AF) the received combined signals to the destination. Besides, the channel state information (CSI) is known to all legitimate users. the proposed algorithm can improve the secrecy capacity compared with the circumstance with all relays. Furthermore, the distributed algorithm confers to the relays self-organization and selfoptimization properties.
The rest of this paper is organized as follows: In Section 2, a cooperative network model with multi-user and multi-relay is proposed based on CCS-AF. A brief introduction of coalitional game is shown in Section 3, and the coalition formation algorithm is introduced in Section 4. The results of simulations are provided and analyzed in Section 5. Finally, conclusions are drawn in Section 6.

System Model
In this section, we model a cooperative system with multiple sources and multiple relays based on CS. As shown in Figure 1, there are sources ( , … , ), relays ( , … , ), eavesdroppers ( , … , ), and one destination ( ; < ) in the network. The transmission period is divided into two time slots. In the first time slot, the source nodes send their own information to the relay nodes simultaneously. In the second time slot, some or all of the relays will be selected to amplify and forward (AF) the received combined signals to the destination. Besides, the channel state information (CSI) is known to all legitimate users.  The sparsity of the sources' signal is denoted as ( ≪ ) [34]. Let ∈ × denote the source-relay channel matrix, the matrix ∈ × denote the relay-destination matrix vector, and the matrix ∈ × denote the source-eavesdropper channel matrix. The source-relay distances, relay-destination distances, and source-eavesdropper distances are represented as , , and , respectively. Secrecy capacity, which is the channel capacity difference between the main channel and the eavesdropper channel, is used to measure the system security. It can be represented as where is the secrecy capacity, is the capacity at destination, and is the capacity at the eavesdropper. The sparsity of the sources' signal is denoted as K (K N) [34]. Let H SR ∈ R M×N denote the source-relay channel matrix, the matrix H DR ∈ R M×1 denote the relay-destination matrix vector, and the matrix H SE ∈ R Z×M denote the source-eavesdropper channel matrix. The source-relay distances, relay-destination distances, and source-eavesdropper distances are represented as d SR , d RD , and d SE , respectively. Secrecy capacity, which is the channel capacity difference between the main channel and the eavesdropper channel, is used to measure the system security. It can be represented as where C S is the secrecy capacity, C D is the capacity at destination, and C E is the capacity at the eavesdropper.

CCS-AF Scheme
In the CCS-AF scheme, there are there phases, namely the sensing phase, measurement phase, and reconstruction phase.

Sensing Phase
In the sensing phase, only K of N source nodes whose readings are changed in a certain quantity will transmit their data to the relay nodes synchronously. Let x i denote the signal transmitted by the source S i . Thus, there are K nonzero elements and N − K zero elements in the N-dimensional sources' signal X = [x 1 , x 2 , . . . , x N ]. According to the CS theory, the number of nonzero elements in the signal is called the sparsity. Hence, the sparsity of sources' signal X is K.

Measurement Phase
In this CCS-AF scheme, the transmission matrix is used as the measurement matrix of CS. Modeled by the source-relay transmission matrix, the signal received at each relay is the linear combination of the sources' signal X. Furthermore, the X signal is compressed from the N dimension to the M dimension through the M × N source-relay transmission matrix.
According to the CS theory, the measurement should satisfy the restricted isometry property (RIP). The transmission matrix is proved as the measurement matrix in the following part.
In the first time slot, the sources send information to relays simultaneously. The power constraints of the sources and relays are P S and P R , respectively. The source-relay channel matrix H SR ∼ N 0, M −1 is incoherent with the identity matrix, and satisfies the RIP property with a high probability as long as M ≥ c·K log(N/K), where M is the number of relays, c is a small constant, K is the sparsity, and N is the number of sources [33]. In this paper, the number of relays M should satisfy Equation (2) [29,34]: The transmission matrix A ∈ R M×N is equal to A = α SR H SR . Besides, α SR is a M × N matrix which represents the path loss of the first time slot, and the path loss from the jth source (S j ) to the ith . The received signal of relays is represented as where N 0 ∈ R M×1 is an additive white Gaussian noise (AWGN) vector at relays and the variance is σ 2 n 0 . In the second time slot, the selected relays amplify and forward the received sources' signal to the destination (D). The diagonal matrix H RD ∈ R M×M represents the channel between relays and the destination. The relay-destination transmission matrix is H = α RD H RD , where α RD ∈ R M is the relay-destination path loss. Thereby, the received signal at the destination is where β is the diagonal matrix and its entity β ii = the amplification coefficient of R i , and W 0 ∈ R M×1 is the noise between relays and D and is a AWGN vector with variance σ 2 w 0 . Equation (4) could be rewritten as where Φ = β·H·A. The Φ matches the requirement of the RIP property, because the transmission matrix A ∈ R M×N satisfies the RIP property and β·H is a diagonal matrix. Therefore, the transmission matrix Φ can be used as the secure measurement matrix to encrypt the sources' signal X.

Reconstruction Phase
The destination receives all the signals from the relays and can recover the sources' signal X from Y D by solving the convex optimization problem: where ε is an upper bound on the magnitude of the noise andX is the reconstructed vector at D.
It should be noted that the eavesdroppers in this model are unable to reconstruct the original signal because they have no knowledge about the measurement matrix. Thus, the eavesdropper cannot overhear the signal from the relay nodes, and the security performance is improved.

Secrecy Capacity
To calculate secrecy capacity conveniently, we use the singular value decomposition (SVD) method introduced in [35,36] to obtain the equivalent parallel channel. The M × N source-relay channel matrix A is transformed to a M × 1 parallel channel vector.
Let A = UΛV H , and then the signal at the relays can be represented by Y R = UΛV H ·X + N 0 , where Λ is a diagonal matrix, U ∈ C M×M and V ∈ C M×N are both unitary matrixes, and V H is the conjugate transpose of V. Hence, the signal received at the relays shown in Equation (3) can be transformed as follows: As is shown, in Equation (7c), Y R = U H ·Y R , X = V H ·X, and N 0 = U H ·N 0 . Then, bringing Equation (7c) into Equation (4), the received signal at the destination can be written as Due to the property of the unitary matrix, the power of signals Y R ,X, and N 0 cannot be changed by the U and V, and we can know that P X = P X , P N 0 = P N 0 , and P Y R = P Y R . Thus, the signal power and the noise power could be formulated as follows: where i indicates the ith parallel Gaussian channel and Λ i is the ith diagonal entry of Λ. Then, the channel capacity C of the main channel is where σ 2 n 0 and σ 2 w 0 are the noise powers of the two time slots, respectively. The signal received by the eavesdropper E f could be expressed as where B f is the transmission vector between the sources and eavesdropper E f and N E f is the noise at E f . The power of the signal and the noise at where B j, f is the path loss between S j and E f , and σ 2 E f is the noise at E f . Therefore, the eavesdropper channel capacity is as follows: The secrecy capacity of the CCS-AF system can be represented as The secrecy capacity is the channel capacity difference between the main channel and eavesdropper channel. From Equation (10), we find that when the relay number M increases, the capacity obtained by each relay decreases because of the reduction of the amplification coefficient. However, the large number of relays can improve the secrecy capacity. Thus, there exists a certain relay number M that maximizes the secrecy capacity. Meanwhile, the position of the relay affects the main channel condition. To obtain the maximum secrecy capacity, we proposed a coalition formation algorithm to select the relays based on coalition game theory because of the distribution property.

Coalition Game Model
In wireless networks, the coalitional game is an effective mathematical tool to enhance the PHY security and improve the performance. As is defined, a coalitional game with transferable utility (TU) is represented by a pair (N , V), where N is the set of players and the function V is a value for each coalition. Denote S as an element in N and φ(S) as the payoff of coalition S during its time slot, and the function V is defined as follows [15]: where C S is the gain in terms of secrecy capacity for coalition S given by (10), C S E is a security loss function for coalition S during the first slot, and the security loss caused by the f th ( f ∈ Z) eavesdropper in the first slot is given by Equation (12). Let C(S) = C S − C S E + , and then C(S) is the secrecy capacity and acts as the measure of the wireless communication security. The cost function C S E is computed according to Equation (13), which is the security loss caused by eavesdroppers.

Coalition Formation
The coalitional game can be divided into two kinds of orders. One is coalition value orders, and the other is individual value orders. Coalition value orders compare the value of two collections, such as the utilitarian order, in which W Z implies In contrast, the individual value orders compare the individual payoff of each player, such as the Pareto order. Assuming that the collection W and the collection Z have the same players and the payoff of a player R j in these two collections are denoted by φ v j (W ) and φ v j (Z ), respectively, which can be written as , ∀R j ∈ W, Z } by Pareto order if the collection W is better than the collection Z. In other words, W is preferred to Z if at least one player's utility is increased without decreasing other players' utilities.
In this CCS-AF network, only the coalition that obtains the highest secrecy capacity can be selected, which means only the relays in the coalition with higher secrecy capacity have more chances for cooperation. If a relay cannot participate the coalition with the highest secrecy capacity, it will obtain nothing. Differently from the cases where the individual values are considered, we consider the whole coalition value, where the Pareto order is not suitable. The two coalitions are preferred to be merged into one coalition if a higher coalition value can be obtained. This merge operation makes the players in these two coalitions have more chance to win the utility. To deal with the cooperative problem, a new comparison relation rule is defined as follows.
Then, the 'Max-Coalition order' is defined as

Merge-and-Split Rule
To make sure the relays can self-organize to form the coalition, the "merge" and "split" rules are defined as below.
Merge Rule: Merge any set of coalitions {S 1 , . . . , S l } whenever the relays prefer the merged form.
Split Rule: Split any coalition l ∪ j=1 S j whenever the relays prefer a split form.
Based on the merge-and-split rules and the 'Max-Coalition order' proposed above, the relays will form a new coalition if split-and-merge operations improve the secrecy capacity; otherwise, they keep the original coalition.

Coalition Formation Algorithm
In this CCS-AF network, some of the relays could form a coalition to maximize the system secrecy capacity based on the newly defined Max-Coalition order. Coalitions would like to merge if the merging forms a preferred coalition. It is implied that a group of relays will sign an agreement to merge into a larger coalition if the coalition yielded by the merge has larger secrecy capacity. Similarly, a coalition should split if the splitting can form a preferred coalition. At the beginning, relays are noncooperative nodes and the coalition structure is W = {{R 1 }, . . . , {R k }, . . . , {R M }}. Therefore, the first operation should be merging. Based on merge-and-split rules and 'Max-Coalition order', the coalition formation algorithm is shown in Table 1. The coalition formation algorithm needs to know the transmission matrix to calculate the secrecy capacity of the possible coalition and decide whether to form this possible coalition. This requires that the CSI must be accurate. If the CSI is wrong, the relays cannot obtain the accurate transmission matrix. This makes the relay node unable to calculate the security capacity of the possible coalition correctly. If the CSI error is too large, the new formed coalition based on the 'Max-coalition order' may have a lower secrecy capacity than the old coalition. This will make the network unable to select the best relay to obtain the highest security performance through the proposed algorithm. Table 1. Coalition formation algorithm.

Stage 2-Secrecy capacity calculation
Calculate the secrecy capacity V of the coalition S k .

Stage 3-Iterative coalition formation
In this phase, a stable coalition structure is formed to obtain a higher secrecy capacity by using merge-and-split rules. The number of selected relays is limited in that 2K ≤ M c < N. Repeat (a) Z n = Merge (W n ): some coalitions in W n decide to merge with each other based on the Max-Coalition order, if the relay number of the new coalition is less than the source number, i.e., M c < N. If the merge can yield a new coalition S k which has a larger secrecy capacity than the coalitions S k and S t , coalitions S k and S t will merge to form the new coalition S k . Otherwise, relays stay in the former coalition; coalitions S k and S t do not change. (b) Z n = Split (W n ): the coalition in this network decides to split based on Max-Coalition order, if the relay number of the new coalition is two times larger than the sparsity, i.e., M c > 2K. (c) n = n + 1.

Until merge-and-split terminates. Final state: Coalition selected
The coalition S c which can obtain the highest system secrecy capacity is selected to transmit the information. Stage 1 to Stage 3 are repeated periodically when the network operates, and this repetition makes sure the network topology is adaptive to the change of environment (such as mobility of relays).
In order to make the topology adaptive to the relays' dynamic location, the coalition formation algorithm is repeated periodically during the network operation. There are three stages in the algorithm: neighbor discovery, secrecy capacity calculation, and the iterative coalition formation. After these three stages, the topology is stable and the appropriate coalition will be selected.
In the neighbor discovery stage (stage 1), each coalition surveys the environment and finds the possible neighbor coalition to cooperate with. In the secrecy capacity calculation stage (stage 2), the coalition calculates the secrecy capacity periodically. Then, the iterative formation process begins (stage 3). In this stage, relays determine whether to merge with other coalitions to form a new coalition or sign a split agreement to break the current coalition. If the merge operation can yield a new coalition S k which has a larger secrecy capacity than coalitions S k and S t , coalitions S k and S t in Z n will merge based on the Max-Coalition order: the two coalitions S k and S t will form a new coalition, S k . This is mainly because merging brings a long-term secrecy capacity improvement of this network. The merging operation will stop if there is not a better merge form. After merging, the coalitions are about to split based on the split rule. If coalitions can find a better split form through the Max-Coalition order, the relays in those coalitions will sign the split agreement to form a new coalition, S k . This is because splitting improves the secrecy capacity of the network. The network will repeat the merge-and-split operations until the highest secrecy capacity has been obtained. The coalition S c which can obtain the highest system secrecy capacity is selected to help sources transmit the information. Under this circumstance, the coalition is stable and relays have no incentive to merge or split to form a new coalition.
The complexity of this algorithm is related to the split/merge operations. In terms of the split operation, supposing the current coalition is S k , the number of potential coalitions grows exponentially with the number of relays in coalition S k . Supposing the number of relays in the current coalition , while the real computation load is usually far below this, for the algorithm will stop when a better coalition is found. The complexity is the number of all possible merge operations under the current coalition structure, while the real computational load is the number of real operations before the merge operation stops, which means there is no other better coalition with higher secrecy capacity that can be obtained through the merge operation. Obviously, the number of real merge operations is far below the number of all possible merge operations under the current coalition structure. In other words, there is no need for the algorithm to traverse all possible situations, because the iteration of operation will stop once a better coalition is found.

Simulations
We consider a coalitional network with 15 users, four relays, two eavesdroppers, and one destination located in a square of 1.2 km × 1.2 km, as shown in Figure 2. Sources are randomly distributed between x = 0 to x = 0.3. The coordinates for the destination and eavesdroppers are set to (1.2 km, 0.6 km) for D, (1.05 km, 0.28 km) for E1, and (0.95 km, 0.93 km) for E2. The path loss µ is 4, the power constraints of sources and relays are P S = 0 dBm and P R = 0 dBm, respectively, and both σ 2 n 0 and σ 2 w 0 are 10 −14 W. words, there is no need for the algorithm to traverse all possible situations, because the iteration of operation will stop once a better coalition is found.

Simulations
We consider a coalitional network with 15 users, four relays, two eavesdroppers, and one destination located in a square of 1.2 km × 1.2 km, as shown in Figure 2. Sources are randomly distributed between x = 0 to x = 0.3. The coordinates for the destination and eavesdroppers are set to (1.2 km, 0.6 km) for , (1.05 km, 0.28 km) for 1, and (0.95 km, 0.93 km) for 2. The path loss is 4, the power constraints of sources and relays are = 0 dBm and = 0 dBm, respectively, and both and are 10 W.

Coalition Formation Process
As shown in Figure Table 2. The details of the coalition formation process are described below. At first, for both Max-Coalition order and Pareto order, the relay nodes are noncooperative and each relay is a coalition. The first operation is a merge operation, and it starts with 3 (the nearest relay from the destination), which attempts to merge with 4 (the closest relay to 3). Then, the coalition { 3, 4} is formed. Subsequently, the coalition { 3, 4} tries to merge with 2 (the nearest relay to the coalition { 3, 4}) to form a three-relay coalition. Then, the process of Max-Coalition order and Pareto order will be described separately.
For Max-Coalition order, the coalition { 3, 4, 2} is formed successfully because the system secrecy capacity is improved from 1.4087 to 1.4583. After that, the coalition { 3, 4, 2} has an incentive to merge with 1, but this merge is impossible as the system utility decreases (1.2593 < 1.4583). Until this moment, the merge operation is finished, for no other better coalition can be obtained by the merge operation, and the split operation begins. For the first split operation, 4 (located in the edge of the current coalition) splits from the coalition { 3, 4, 2} successfully, because the split operation can enhance the secrecy capacity from 1.4583 to 1.5547. Then, the iteration process ends. Thus, the coalition { 3, 2} is the selected coalition, and its utility is

Coalition Formation Process
As shown in Figure 2, the coordinates for relays are set to (0.75 km, 0.15 km) for Relay 1 (R1), (0.68 km, 0.45 km) for Relay 2 (R2), (0.75 km, 0.75 km) for Relay 3 (R3), and (0.65 km, 1.05 km) for Relay 4 (R4). It is shown in Figure 2 that R3 and R4 form a coalition and help sources to forward the information. The capacities of all potential coalitions and the relay utility are shown in Table 2. The details of the coalition formation process are described below. Table 2. The utility of each potential coalition and each relay for the network of Figure 2. At first, for both Max-Coalition order and Pareto order, the relay nodes are noncooperative and each relay is a coalition. The first operation is a merge operation, and it starts with R3 (the nearest relay from the destination), which attempts to merge with R4 (the closest relay to R3). Then, the coalition {R3, R4} is formed. Subsequently, the coalition {R3, R4} tries to merge with R2 (the nearest relay to the coalition {R3, R4}) to form a three-relay coalition. Then, the process of Max-Coalition order and Pareto order will be described separately.

Max-Coalition order
For Max-Coalition order, the coalition {R3, R4, R2} is formed successfully because the system secrecy capacity is improved from 1.4087 to 1.4583. After that, the coalition {R3, R4, R2} has an incentive to merge with R1, but this merge is impossible as the system utility decreases (1.2593 < 1.4583). Until this moment, the merge operation is finished, for no other better coalition can be obtained by the merge operation, and the split operation begins. For the first split operation, R4 (located in the edge of the current coalition) splits from the coalition {R3, R4, R2} successfully, because the split operation can enhance the secrecy capacity from 1.4583 to 1.5547. Then, the iteration process ends. Thus, the coalition {R3, R2} is the selected coalition, and its utility is v({R3, R2}) = 1.5547. As a result, for Max-Coalition order, the coalition {R3, R2} cannot merge or split any further, and the final coalition structure is W = {{R3, R2}, {R1}, {R4}}.
In contrast, based on Pareto order, the coalition {R3, R4, R2} cannot be formed. This is because the utilities of R3 (0.6257 < 1.0481) and R4 (0.1701 < 0.3606) cannot be improved through this merge. Then, the coalition {R3, R4} tries to merge with R2, but the merge operation fails for the same reason (for R3 0.5402 < 0.6257 and for R4 0.1522 < 0.3606). For Pareto order, the coalition {R3, R4} is selected and its utility is v({R3, R4}) = 1.4087. It can be seen that the utility obtained by Max-Coalition order is higher than that of the Pareto order, and this result demonstrates the effectiveness of the Max-Coalition order.

The Adaption on the Relay's Mobility
In this section, the algorithm's ability for handling the relay's mobility is studied. For this purpose, R3 in Figure 2 is moved horizontally from 0.45 km (R3 ) to 1.05 km (R3 ). The change of the coalition structure and the performance are shown in Figures 3 and 4, respectively. In contrast, based on Pareto order, the coalition { 3, 4, 2} cannot be formed. This is because the utilities of 3 (0.6257 < 1.0481) and 4 (0.1701 < 0.3606) cannot be improved through this merge. Then, the coalition { 3, 4} tries to merge with 2, but the merge operation fails for the same reason (for 3 0.5402 < 0.6257 and for 4 0.1522 < 0.3606). For Pareto order, the coalition { 3, 4} is selected and its utility is ({ 3, 4}) = 1.4087. It can be seen that the utility obtained by Max-Coalition order is higher than that of the Pareto order, and this result demonstrates the effectiveness of the Max-Coalition order.

The Adaption on the Relay's Mobility
In this section, the algorithm's ability for handling the relay's mobility is studied. For this purpose, 3 in Figure 2 is moved horizontally from 0.45 km ( 3') to 1.05 km ( 3''). The change of the coalition structure and the performance are shown in Figures 3 and 4, respectively. In Figure 3, the coalition structure changes dynamically when relay 3 changes its location. When relay 3 moves from sources to the destination, 1 first splits from { 1, 2, 3}. When 3 moves close to destination, 4 merges and forms the coalition { 2, 3, 4}. Figure 4a is the secrecy capacity of the system, and Figure 4b is the utility of each relay accordingly. In Figure 4a, it is obvious that the system secrecy capacity obtained by the coalition formation algorithm is much higher than the circumstance when all relays are selected. This phenomenon proves that the coalitional game algorithm improves the system security.  moves close to destination, 4 merges and forms the coalition { 2, 3, 4}. Figure 4a is the secrecy capacity of the system, and Figure 4b is the utility of each relay accordingly. In Figure 4a, it is obvious that the system secrecy capacity obtained by the coalition formation algorithm is much higher than the circumstance when all relays are selected. This phenomenon proves that the coalitional game algorithm improves the system security.   In Figure 3, the coalition structure changes dynamically when relay R3 changes its location. When relay R3 moves from sources to the destination, R1 first splits from {R1, R2, R3}. When R3 moves close to destination, R4 merges and forms the coalition {R2, R3, R4}. Figure 4a is the secrecy capacity of the system, and Figure 4b is the utility of each relay accordingly. In Figure 4a, it is obvious that the system secrecy capacity obtained by the coalition formation algorithm is much higher than the circumstance when all relays are selected. This phenomenon proves that the coalitional game algorithm improves the system security.
Obviously, the selected coalition through the coalition formation algorithm is stable based on the Max-Coalition order, because there is no relay that has an incentive to split or merge and form another coalition which can obtain a higher system secrecy capacity. Due to the fact that the algorithm prefers a higher secrecy capacity to keep the stability of the coalition, the coalition structure will change to obtain a higher capacity when R3 moves from 0.45 km to 1.05 km . We can easily know that the splitting of R1 at 0.5 km is beneficial to both R2 and R3 from Figure 4b, so R1 splits from {R1, R2, R3}. During the movement of R3, the utility of R3 is increasing, and this is because R3 is getting closer to the destination. After R3 moves at 0.85 km , the system capacity starts increasing. It is clear that the merging of R4 increases the utility of R3 and the capacity of the system.
Obviously, the secrecy capacity obtained through the proposed algorithm is higher than the secrecy capacity obtained with all relays. This is because the relays can self-organize into some coalitions, and the best coalition structure will be formed after some iteration guided by the 'Max-Coalition order'. Due to the property of the 'Max-Coalition order', the relays will try to form the coalitions which can obtain a higher secrecy capacity. Thus, the final formed coalition structure is the best structure and it is stable because relays cannot form another structure with a higher secrecy capacity. In the final state, the relays in the best coalition which obtains the highest system secrecy capacity will be selected to transmit the source information. Therefore, we can easily know that the selected relays have a higher ability to obtain the secrecy capacity than the other unselected relays, and the total relay power will be only allocated to these selected relays. In other words, this relay-selection algorithm can select better relays and increase the efficiency of the total relay power. Thus, the secrecy capacity is improved by the proposed algorithm. Figure 5 shows the system performance and the average size of coalitions versus P R , where the number of sources N is set to 15 and 35, respectively. The total power of sources P S = 0 dBm and P R varies from 0 dBm to 30 dBm. Figure 5a is the average number of the selected relays with different P R . It can be observed that the average number of selected relays increases with the increase of P R . This implies that the higher P R is, the more relays that have a chance to gain their utilities. Compared with the circumstance when N = 15, especially when P R is large, the number of selected relays when N = 35 is higher. When P R ≥ 22 dBm, the number of selected relays (when N = 15) is no more than 15; this can be explained by Equation (2). Figure 5b demonstrates the maximum system secrecy capacity when the number of selected relays is set as in Figure 5a. The secrecy capacity with each N increases with the increase of P R . In other words, higher P R results in a better system performance. Figure 5 shows the system performance and the average size of coalitions versus , where the number of sources is set to 15 and 35, respectively. The total power of sources = 0 dBm and varies from 0 dBm to 30 dBm. Figure 5a is the average number of the selected relays with different . It can be observed that the average number of selected relays increases with the increase of . This implies that the higher is, the more relays that have a chance to gain their utilities. Compared with the circumstance when = 15, especially when is large, the number of selected relays when = 35 is higher. When ≥ 22 dBm, the number of selected relays (when = 15) is no more than 15; this can be explained by Equation (2). Figure 5b demonstrates the maximum system secrecy capacity when the number of selected relays is set as in Figure 5a. The secrecy capacity with each increases with the increase of . In other words, higher results in a better system performance.

The Effect of Power on the Performance
(a) Average number of the selected relays ( b) System secrecy capacity  Figure 6 represents the secrecy capacity versus P S where the number of sources N is set to 15 and 35, respectively. The total power of relays P R = 0 dBm and P S varies from 0 dBm to 18 dBm. The secrecy capacity is first increased and then decreased along with the increasing of the P S . When P S is larger than a certain value, the secrecy capacity will drop to zero (for N = 15 and 35, the certain values of P S are 10 dBm and 12 dBm, respectively). This means the too-large P S has a negative effect on the system security. This phenomenon can be explained by Figure 7a,b. When P S increases, the channel capacity goes up first and then stays steady at the point about P S = 15 dBm. While the secrecy loss caused by eavesdroppers increases slowly at first, and at the point about P S = 15 dBm, it goes up rapidly. In other words, when P S is larger than a certain value, the increase of eavesdropper capacity is much faster than that of the channel capacity. Thus, the large P S degrades the secrecy capacity.
Sensors 2018, 18, x FOR PEER REVIEW 13 of 15 Figure 6 represents the secrecy capacity versus where the number of sources is set to 15 and 35, respectively. The total power of relays = 0 dBm and varies from 0 dBm to 18 dBm. The secrecy capacity is first increased and then decreased along with the increasing of the . When is larger than a certain value, the secrecy capacity will drop to zero (for = 15 and 35, the certain values of are 10 dBm and 12 dBm, respectively). This means the too-large has a negative effect on the system security. This phenomenon can be explained by Figure 7a,b. When increases, the channel capacity goes up first and then stays steady at the point about = 15 dBm.
While the secrecy loss caused by eavesdroppers increases slowly at first, and at the point about = 15 dBm, it goes up rapidly. In other words, when is larger than a certain value, the increase of eavesdropper capacity is much faster than that of the channel capacity. Thus, the large degrades the secrecy capacity.

Conclusions
In this paper, a distributed multi-relay selection algorithm based on the coalition formation game is proposed to enhance the physical layer security of the CCS-AF wireless network, which consists of multiple sources and multiple relays with compressed sensing. Compared with the traditional 'Pareto order', the newly defined 'Max-Coalition order' rule is proved to be more suitable to solve the multi-relay selection problem for the CCS-AF networks. Simulation results show that the relays can self-organize into a better coalition and have good ability to adapt to the change of the topology. The proposed algorithm can select the better relay nodes and increase the efficiency of the

Conclusions
In this paper, a distributed multi-relay selection algorithm based on the coalition formation game is proposed to enhance the physical layer security of the CCS-AF wireless network, which consists of multiple sources and multiple relays with compressed sensing. Compared with the traditional 'Pareto order', the newly defined 'Max-Coalition order' rule is proved to be more suitable to solve the multi-relay selection problem for the CCS-AF networks. Simulation results show that the relays can self-organize into a better coalition and have good ability to adapt to the change of the topology. The proposed algorithm can select the better relay nodes and increase the efficiency of the total relay power. If the CSI is accurate, the system security performance can be improved significantly through the distributed relay selection algorithm.