- Research
- Open Access

# Based on the Stackelberg game with decode and forward protocol for physical layer security in the heterogeneous wireless networks

- Shuanglin Huang
^{1}Email authorView ORCID ID profile, - Qiongying Tan
^{1}, - Aixia Jing
^{1}and - Sanjun Liu
^{1}

**2018**:270

https://doi.org/10.1186/s13638-018-1288-x

© The Author(s). 2018

**Received:**10 April 2018**Accepted:**7 November 2018**Published:**27 November 2018

## Abstract

Using wireless relay nodes to cooperate is a very important helpful way to improve the physical layer security performance. In this paper, in the presence of an eavesdropping node between the source and destination nodes, a decoded and forward technology is used to form a virtual beam through the relay nodes, which selectively enables the main lobe to point to the destination node to achieve the secure communication of the physical layer. However, this situation often requires the assumption that the relay nodes involved in collaborative help can unconditionally and unselfishly assist other nodes in secure communication. In the actual heterogeneous wireless network environment, each wireless node has selfishness, and their relationship is not only cooperative but also competitive. First, in order to encourage the active participation of the relay nodes, the relationship between the source nodes and the cooperative relay nodes is modeled as the Stackelberg game. Through this game, the dynamic compensation of the power consumed for the cooperative nodes is achieved. Then, in order to promote the virtuous competition among the relay nodes involved in the cooperation, the competition relationship among the participating cooperation nodes is constructed as a noncooperative game. The game will enable all cooperative relay nodes to dynamically and reasonably charge the consumed power. In the case of a certain security rate, this paper proves the power allocation of the source node and the cooperative relay node, as well as the existence and uniqueness of the equilibrium point of the power price. And the convergent search algorithm is given. The simulation results show that the distribution power of the source node and the cooperative relay node will be dynamically optimized with the dynamic change of channel characteristics. The power pricing of the relay nodes will also change with the dynamic changes of channel characteristics and node distribution. In addition, when the number of relay nodes participating in cooperation exceeds 6, the additional revenue to the source node is less.

## Keywords

- The heterogeneous wireless network
- Physical layer security
- Decode and forward
- Stackelberg game
- Power dynamic pricing

## 1 Introduction

With the rapid development of modern wireless communication technology and network, especially the global 4G, and even the 5G mobile network development, communication security is an important problem to be solved urgently. Because of the openness of the wireless communication media, the transmission of information is easily stolen, tampered, or attacked. In order to solve this problem, a new solution is proposed, which is the physical layer security technology. The physical layer security technology is not dependent on the encryption and encapsulation of data, but it has the characteristics of absolute security of information transmission [1, 2], which has the advantage that the encryption processing of the upper layer of the protocol stack can not be compared. In recent years, the physical layer security technology has become a hot topic in the field of information security.

In 1975, Wyner proved that in a discrete and memoryless channel, if the quality of the eavesdropping channel is worse than the main channel, a channel coding can always be found so that the eavesdropper cannot get any information from the received signal to achieve a perfect state of secrecy in the case of the correct demodulation of the legitimate user. There is an upper limit on the way, which is called the security capacity [3]. Leung-Yan-Cheong and Hellman and Csiszar and Korner proved in 1978 that the secrecy capacity of the AWGN channel is actually the difference between the channel capacity of the legitimate channel and the eavesdropping channel, and it actually describes the upper bound of the channel in the secure transmission channel [4, 5]. Therefore, when the capacity of the main channel of the legitimate communication channel is greater than the capacity of the eavesdropping channel, it can transmit the secret information at a nonzero rate, without fear of the eavesdropper’s illegal eavesdropping. Since the early wireless communication is a single-antenna system with point-to-point communication, it is difficult to meet the condition that the capacity of the main channel is greater than that of the eavesdropping channel under the presence of the eavesdropping nodes, which makes the actual physical layer security capacity zero.

In recent years, with the development of wireless communication technology, complex communication systems (such as multiple-input multiple-output (MIMO)) and cooperative relay technology have opened new windows for physical layer security communication. The rapid progress of physical layer technology in wireless communication has promoted the emergence of a new form of eavesdropper. The reference [6] presented a method of using space-time codes to approximate the capacity of secret channels in ultra-wideband (UWB) systems. In reference [7], the maximum achievable security rate of orthogonal frequency division multiplexing (OFDM) system through reasonable power allocation is studied. In reference [8], a scheme for transmitting artificial noise is proposed. Because artificial noise is in the zero space of the legitimate channel and does not affect the legitimate parties, it will deteriorate the performance of the eavesdropper. In reference [9], the method of maximizing the transmission rate of the system by dispatching the antenna to transmit power is studied when the number of multicast antennas is larger than the number of the antenna. In particular, many useful researches have been made on the third party trusted nodes.

The reference [10] first studied various models of eavesdropper relay channel. In reference [11], the rate region and random rate region of the eavesdropping relay channel are derived, and the coding problem of the eavesdropping relay channel was studied under the assumption that the transmission information is secret to the relay node. In reference [12], the authors studied the physical layer security problem of relay network models with multiple relay nodes. With the goal of maximizing the security rate, several different cooperative mechanisms are proposed, which are amplified and forward cooperative relays, decoded and forward cooperative relays, and cooperative jamming relays. The reference [13] further optimizes the collaborative scheme based on decode and forward (DF) technology proposed in reference [12] and obtains a more general global optimal solution. In reference [14], the DF and cooperative jamming (CJ) technologies are fused on the basis of the above scheme, and a collaboration scheme based on decode-and-forward plus cooperative jamming (DFCJ) is proposed, which can improve the security performance of the physical layer more effectively. In reference [15], a cooperative node sent a blocking signal to suppress information leakage to the eavesdropper. The current research focused on how to improve the second-stage security [16] of relay cooperation. In reference [17, 18], the authors also used a joint and blocking joint selection scheme to improve the physical layer security performance of the system for both the amplified and forward and decoding forward two-way relay networks. The physical layer security technology based on OFDM communication system was outlined in reference [19]. The robustness of beamforming in the presence of noise, interference and multipath fading was analyzed. It can be seen that the relay cooperation technology has further widened the application scope of the physical layer security and has broad application prospects.

However, due to the mobility of wireless nodes under heterogeneous wireless networks, the channel characteristics of nodes change dynamically. The effective physical layer security capacity is difficult to be effectively guaranteed. Considering the selfishness of cooperative nodes, people propose a game cooperative approach. The references [20, 21] not only study the physical layer security performance of the two cooperative nodes to assist the same source node, but also study the physical layer security performance of the single cooperative interference node in the multi source node competition, and model the relationship between them as a Stackelberg game. In reference [22], a noncooperative game was used to study the transmission of uplink in the future wireless network, and a behavior hypothesis based method is proposed to solve the problem of relay selection and response to malicious nodes. In [23], the static game between Alice and relay was studied by auction theory, which helps solve the problem of active utilization of interference. The reference [24] investigated the cooperation between source, legitimate relay and destination node, and formed a cooperative alliance. The alliance game was used to study the formation of the wireless node cooperation alliance and the impact on the security performance of the physical layer. Based on the OFDM multicarrier allocation technology, the wireless nodes belonging to different subjects were formed into a cooperative alliance, and the Nash bargaining solution, which is satisfied by both parties, is obtained through the bargaining cooperation game in reference [25]. On the basis of the above, based on the cooperative jamming technology, the power allocation between the source nodes and the third party trusted nodes participating in the collaboration was further studied and modeled as a Stackelberg game in reference [26].

However, these studies mainly consider the simple cooperative strategy or the countermeasures, and still need to be further studied in the dynamic network environment. Unlike the reference [26], the cooperative jamming technique is used to interfere the acceptance of the eavesdropping node. This paper uses trusted cooperative relay nodes to forward the information from the source node. At the same time, the beamforming technology is used to avoid wiretap eavesdropping and enhance the signal strength to the legitimate destination node. Thus, a higher physical layer security capacity is obtained. In this paper, under the environment of heterogeneous wireless network, the information security transmission between source node and destination node is realized with the help of cooperative relay nodes. The power weight of cooperative relay nodes is optimized by the source node, so that the virtual beamforming is directed to the destination node, and at the same time, the effective power of the eavesdropper nodes is minimized. Thus it can not only help the information security transmission between the source nodes, but also against the malicious eavesdropping information of the eavesdropper nodes. For example, in heterogeneous network environments where wireless fidelity (WiFi) networks and cellular networks coexist, mobile terminals often need to transmit important information through WiFi networks. If the content or information of the mobile terminal is particularly important, It can use the help of other mobile terminal nodes that can be trusted to forward the key information to avoid malicious node eavesdropping. Similarly, in the heterogeneous environment where wireless sensor networks and WiFi coexist, there are similar issues of information security transmission and similar solutions.

In addition, the wireless nodes in the heterogeneous wireless communication network have mobility, the relationship between nodes changes and the channel characteristics between the wireless nodes are in dynamic change. Therefore, the relative relationship among the wireless nodes (neighborhood relationship, collaboration relationship, competition relationship) is also changing dynamically. At the same time, mobile wireless nodes generally belong to different subjects and have selfishness. Their participation in collaboration always chooses strategies that are more favorable to themselves. Therefore, in order to motivate the trustworthy relay nodes to actively participate in the cooperation, the source node with confidential information transmission requires a certain cost to compensate for the energy consumption which is used by the cooperation node to help it to complete the secure communication. On the other hand, the source node always wants to pay only less cost to the wireless nodes participating in cooperation, so that it can get satisfactory results. In this way, the source node will choose those third party trusted nodes with low power price and greater help to participate in collaboration. This requires the reasonable pricing of the potential wireless relay nodes, which can occupy the advantages that should be occupied in many alternative relay nodes and obtain the relative maximum income. For example, in the vegetable market, a single merchant raising the price will only make it difficult to sell their own goods, to their own losses. And if a merchant’s product cost is lower, it can objectively sell the goods at a price lower than the market price, thus gaining more sales and profits. Based on this consideration, the relationship between the source node and the trusted relay nodes which participates in the cooperative secure transmission is modeled as the Stackelberg game, and the relationship between the competing trusted relay nodes is modeled as a noncooperative game.

The contents of this paper are organized as follows: the second part is the system model, the third part is the game modeling, the fourth part is the power allocation strategy and the power price dynamic adjustment program, the fifth part is the simulation, and the sixth part is the summary of this paper.

## 2 System experimental model design

*N*trustworthy relay nodes and an eavesdropper node. As shown in Fig. 1, there is a source node and destination node pair, which communication is helped by

*N*relay nodes in the presence of an eavesdropping node. The

*N*relay nodes

*r*

_{1},...

*r*

_{N}, execute the decoding and forwarding protocol. When the source and destination node channel capacity is weaker than the wiretap channel, in order to ensure the physical layer secure transmission of information, it is necessary to resort to the assistance of some cooperative relay nodes by sending a virtual beamforming signal, which can greatly improve the channel capacity between the source node and destination node, and create a secure communication environment. All wireless nodes are equipped with an omnidirectional single antenna to transmit and receive data, and work in a half-duplex mode.

In this paper, the variables are expressed in the following form. The bold body capitals represent the matrix, while the bold body lowercase letter represents the column vector. The conjugate, transposition and conjugate transposition of the matrix are expressed by three markers, (•)^{*}, (•)^{T}, and (•)^{†} respectively. In addition, it is assumed that all communication channels are ergodic, flat fading and semi static. The whole communication process includes two parts for the cooperation scene of relay nodes. First, the source node sends the signal to the destination node and the relay nodes with power *P*_{s}. Meanwhile, the information will also be eavesdropped by the eavesdropping node. The channel gain of link S → D and S → E is |*h*_{0}|^{2} and |*g*_{0}|^{2}, respectively. And **η**(*N* × 1) represents the channel vector between the *N* relay nodes and the source node. Second, all cooperative relay nodes are combined to decode and forward the signal from the source node with power *P*_{D}, and \( {P}_{r_i} \) is used to express the relaying power of the relay node *r*_{i} for the important information transmission of the source node. The weight vector of all the cooperative relay nodes to forward signals is **w**_{D}(*N* × 1), **h**(*N* × 1) represents the channel vector between the *N* relay nodes and the destination node, and **g**(*N* × 1) represents the channel vector between the *N* relay node and the eavesdropping node, defining **R**_{h} = **hh**^{†} and **R**_{g} = **gg**^{†}. It is assumed that the source node can obtain the instantaneous channel information of each communication channel, and the noise power at the eavesdropping node and the destination node are *σ*^{2}.

### 2.1 The direct transmission

This paper discusses the use of relay node cooperation to improve the physical layer security performance. But all cooperation is achieved on the premise that better results can be achieved than direct transmission (without cooperation). Therefore, the following signals are given at the time of direct transmission to facilitate comparison with the subsequent cooperative transmission.

*x*, the signal received at the destination is given by the next type

*n*

_{d}and

*n*

_{e}represent the complex Gauss noise at the destination node and the eavesdropping node (where the noise is assumed to be white noise in each time slot), respectively.

### 2.2 The decode and forward cooperative transmission

*n*code symbols to transmit to the trusted relay node. When the source node is transmitting the symbol

*x*, the signal received by its

*N*trusted relay nodes is expressed in the form of a vector.

**η**= (

*η*

_{1},

*η*

_{2}, …,

*η*

_{N}) is the channel gain vector between the source node and its

*N*trusted relay nodes.

**n**

_{r}is the noise vector that is received at the

*N*trusted relay nodes. Then, in the first stage, the signal received at the relay node

*r*

_{i}can be expressed as

*N*trusted relay nodes is shown as follows

*N*trusted relay nodes in the first phase can be expressed as follows

It is visible from the upper form that the rate of secrecy obtained in the first stage is determined by the power of the source node when the channel condition is certain.

In the second stage, we assume that all trusted relay nodes can successfully decode confidential information sent from the source node, re-encode the information, and transmit the recoded information to the destination node cooperatively by using the next second time slots. Specifically, each relay node transmits copies of the recoding information separately according to weight.

*n*

_{d}and

*n*

_{e}respectively indicate the noise signals received at the destination node and the eavesdropping node.

The cooperative transmission is divided into two stages, so the final secrecy rate needs to be satisfied in every transmission stage, so as to ensure that it is finally satisfied. In this way, in the first stage, it must first be ensured that the secret rate between the source node and each relay node performing DF protocol is not less than the final secret rate achieved by the destination node.

The entire collaboration scheme is divided into two parts. In the first part, the source node broadcasts its transmission information to the destination node and the relay node that participates in the collaboration. In the proposed scheme, when the *N* trusted relay nodes based on the decoded and forwarding protocol transmit the secret information from the source nodes according to the weight, all the cooperative nodes are virtual beamforming, and the main lobe is directed to the destination node. This can help the secure communication between the source node and its destination node.

## 3 Problem description and game modeling

The wireless nodes in the heterogeneous wireless communication network have mobility. The channel characteristics are dynamic, and neighborhood relationships among wireless nodes, cooperative relationship and competitive relationship are also changing dynamically. The source node always wants to pay only the lowest cost of the wireless nodes participating in the cooperation, so that the secret communication rate satisfying its full requirement can be obtained. Assuming that the minimum security rate of the source node is \( {R}_s^0 \), then \( {R}_s\ge {R}_s^0 \) is needed.

It is obvious that the communication nodes in the wireless collaboration network belong to different individuals and are selfish. Therefore, the source node needs to take measures to motivate the possible relay nodes to help forward the transmission of data from the source nodes. Depending on the relationship between the source node and the cooperative relay nodes, the source node is regarded as the buyer, and all relay nodes participating in the cooperation act as sellers in this paper.

*U*

_{s}represents all the payment, and

*U*

_{s}is defined as a linear function of the transmission power of the source node and the cooperative nodes. Thus, it is expressed as follows

_{s}and \( {v}_{r_m} \) respectively represent the power price of the source node

*S*and the cooperative relay node

*r*

_{m}, and \( {P}_{r_m} \)represents the power purchased by the source node from the relay node

*r*

_{m}for relay transmission.

The optimization objective of Eq. (17) is to minimize the total payment, and the smaller the overall rate of confidentiality, the smaller the total payment required. Therefore, the minimum rate of secrecy required to satisfy the requirement is \( {R}_s={R}_s^0 \). From Eqs. (11) and (12), we can get the results in the upper form. Equation (17) reflects that the source node plays a leading role in the relationship with all cooperative relay nodes, and it is a Stackelberg game. Through the above game, the source node will choose those low power prices and cooperate with the third party trusted nodes. This requires the reasonable pricing of the potential wireless relay nodes to maintain the inherent advantage in many alternative relay nodes and obtain the relative maximum income.

*r*

_{m}can be defined as

*r*

_{m}. As a result, the optimization problem for the revenue of cooperative relay node

*r*

_{m}can be expressed as

In the network model given in this paper, all potential cooperative relays need to win the favor of the source nodes through competition in order to be selected as the cooperative nodes by the source nodes. Therefore, every potential relay node needs to develop a competitive power price. At the same time, all relay nodes participating in cooperation hope to get maximum benefits. The source node plays a leading role in the game between the source node and the cooperative relay nodes. The source node will perform optimal power allocation according to its own power cost, the channel state between each other, and the power price of each cooperative relay node. If a cooperative relay node increases its power price, the source node will reduce its power share to buy it, and vice versa. At the same time, if a cooperative relay node changes its power price, it will also cause other relay nodes to adjust its power price. This creates an internal constraint that will facilitate each relay node to work out a reasonable power price. It can obtain considerable power quotas from the source node and can get the highest possible return at a high price. Based on this consideration, this paper models the relationship between the source node and the trusted relay nodes participating in cooperative secure transmission into Stackelberg games. And the relationship between the competing trusted relay nodes is modeled as a noncooperative game [27].

**Lemma 1:**Order

**s**and

**t**(

**s**and

**t**are known) represent linear unrelated column vectors, so the matrix

**ss**

^{†}

**− tt**

^{†}has and has only two nonzero eigenvalues. For example,

*η*

_{1}> 0 and

*η*

_{2}< 0 can be expressed as [13]:

*θ*is the angle of the vector

**s**

^{†}

**t**.

## 4 The power allocation and price selection method

In heterogeneous wireless networks, the source nodes that need to transmit important data will first choose trusted and appropriate relay nodes as cooperative relay partners. Then, according to the preciousness of the power of each relay node (which is reflected by the power price), the source node determines the amount of power consumed by each relay node, and the source node pays for it. On this basis, each relay node needs to dynamically select the best power price according to the dynamic changes of the network environment, so as to obtain the best benefits.

### 4.1 The power allocation method

We first fix *P*_{s} and find the relay power weights that minimize the payment to the relay nodes. Then, we find the value of *P*_{s} that minimizes the overall payment *U*_{s} of the source node.

*P*

_{s}is a constant numerical value. Then, in order to simplify the expression, \( \tilde{\mathbf{h}}=\left\{\frac{h_{r1}}{\sqrt{v_{r1}}},\frac{h_{r2}}{\sqrt{v_{r2}}},\dots \dots, \frac{h_{rN}}{\sqrt{v_{rN}}}\right\} \), \( {\tilde{\mathbf{R}}}_h={\tilde{\mathbf{h}}}^{\dagger}\tilde{\mathbf{h}} \), \( \tilde{\mathbf{g}}=\left\{\frac{g_{r1}}{\sqrt{v_{r1}}},\frac{g_{r2}}{\sqrt{v_{r2}}},\dots \dots, \frac{g_{rN}}{\sqrt{v_{rN}}}\right\} \), \( {\tilde{\mathbf{R}}}_g={\tilde{\mathbf{g}}}^{\dagger}\tilde{\mathbf{g}} \), and \( {\tilde{\mathbf{w}}}_D=\left(\sqrt{v_{r1}}{w}_{r2},\sqrt{v_{r2}}{w}_{r2},\dots \dots, \sqrt{v_{rN}}{w}_{rN}\right) \). As a result, the optimization problem of Eq. (23) can be further transformed into

*ξ*> 0 is assumed first, the matrix \( \tilde{\mathbf{R}} \) is positive definite, and any eigenvalue of the matrix \( \tilde{\mathbf{R}} \) is assumed to be

*λ*. So, the following relational expression can be obtained.

Since *ξ* > 0 and it is a constant, the optimization problem of minimizing \( {\tilde{\mathbf{w}}}_D^{\dagger }{\tilde{\mathbf{w}}}_D \) is equivalent to finding the optimization problem of maximizing *λ*. The largest *λ* is the largest eigenvalue of the matrix \( \tilde{\mathbf{R}} \).Therefore, by Eq. (24), it is possible to know that the optimal \( {\tilde{\mathbf{w}}}_D \) is the eigenvector corresponding to the largest eigenvalue of the matrix \( \tilde{\mathbf{R}} \).

On the other hand, if *ξ* ≤ 0, that means \( {P}_s\ge \frac{\sigma^2\left({4}^{R_s^0}-1\right)}{{\left|{h}_0\right|}^2-{4}^{R_s^0}{\left|{g}_0\right|}^2} \). For \( {P}_s\ge \frac{\sigma^2\left({4}^{R_s^0}-1\right)}{{\left|{h}_0\right|}^2-{4}^{R_s^0}{\left|{g}_0\right|}^2} \), it means that the source node and destination node can directly achieve the required secrecy rate in the first stage, and it does not need to introduce other relay nodes into collaboration in the second stage. Therefore, this paper does not discuss the absence of cooperative node participation under the *ζ* ≤ 0 condition.

*uv*−

*q*> 0. Because of \( {\tilde{\mathbf{R}}}_h={\tilde{\mathbf{h}}\tilde{\mathbf{h}}}^{\dagger } \) and \( {\tilde{\mathbf{R}}}_g={\tilde{\mathbf{g}}\tilde{\mathbf{g}}}^{\dagger } \), \( \tilde{\mathbf{R}} \) can be represented as

*U*

_{s}(

*P*

_{s}) is a monotonically increasing function of

*P*

_{s}, so the optimization problem for the minimum value of the above equation requires that the value of the

*P*

_{s}is as small as possible. In addition, according to Eq. (8), it must be satisfied

*P*

_{s}is obtained (that is the optimal solution for

*P*

_{s}).

In the first stage, \( {P}_s^{\mathrm{min}} \) is the lowest power consumed by the source node to achieve the lowest confidential rate of the selected relay nodes in the presence of eavesdropping nodes. The upper limit of \( {P}_s^{\mathrm{min}} \) is \( \frac{\sigma^2\left({4}^{R_s^0}-1\right)}{{\left|{h}_0\right|}^2-{4}^{R_s^0}{\left|{g}_0\right|}^2} \), which corresponds to the situation of *ξ* = 0. This means that communication between the source node and the destination node can directly obtain the required secrecy rate without relying on the selected relay nodes. At this point, the source node needs to reselect other more appropriate relay nodes to participate in collaboration for the secrecy communication, or without the help of the selected cooperative relay nodes. The principle of relay node selection: First, the source node should select the relay nodes which are more favorable to receive the source node information than the eavesdropper node, so as to ensure reliable secrecy rate in the first stage. Secondly, the source node should select the relay nodes that are more conducive to receiving source node information than destination node, so that they can really help the secret communication between source node and destination node.

*r*

_{m}can be obtained

*r*

_{m}is

From the above equation, it can be seen that \( {P}_{r_m} \) is a monotone subtraction function for \( {v}_{r_m} \).

### 4.2 The power pricing method for relay

In this section, we will discuss the power price strategy of the relay nodes.

It is noted that Eq. (20) is a noncooperative game between the cooperative relay nodes, and there is a tradeoff between the utility\( {U}_{r_m} \) and the energy price\( {v}_{r_m} \) of the relay nodes. If the relay node *r*_{m} has good channel conditions and its energy price is relatively low, the source node will ask for more cooperative power from the relay node *r*_{m}, so that \( {U}_{r_m} \) will increase with \( {v}_{r_m} \) growth. When \( {v}_{r_m} \) grows to more than one value, it is no longer useful for the source node to select it to participate, even if the channel of *r*_{m} is dominant. In this way, *r*_{m} needs to reduce \( {v}_{r_m} \), so that the source node will select it, and request more power to participate in collaboration for relaying. Therefore, every relay node *r*_{m} is required to dynamically give the optimal power price which changes with the channel condition. Because the source node will only choose the most favorable relay nodes, the optimal price will also be influenced by other relay nodes. In addition, when the power cost of cooperative relay node is increased (for example, the energy of the node itself is reduced, the request of cooperation is increased, the maximum power limit value and so on), the starting point of cooperative nodes’ cooperation and power price will rise.

*γ*> 0 and

*γ*is constant. That is, the initial value can be obtained for Eq. (37) about finding the first derivative and making it zero.

On the basis of this, the specific algorithm process is as follows: (1) Initialization: initial setting and calculation, such as computing \( {v}_{r_m}^{(0)}={c}_{r_m}+\sqrt{\frac{c_{r_m}{k}_{m1}}{l_{m1}}+{c_{r_m}}^2} \); (2) Recursive computation: first, we generate a random perturbation value *ε*_{i} (zero mean Gauss random variable) and then update its power price (if the secrecy rate under \( {v}_{r_m}^{\left(i-1\right)}+{\varepsilon}_i \) is greater than the secrecy rate under \( {v}_{r_m}^{\left(i-1\right)} \), \( {v}_{r_m}^{(i)}={v}_{r_m}^{\left(i-1\right)}+{\varepsilon}_i \). Otherwise, \( {v}_{r_m}^{(i)}={v}_{r_m}^{\left(i-1\right)} \)); (3) Repeat the step (2) until the stop condition (the number of recursion is reached or the secrecy rate reaches the error requirement) is satisfied.

In addition, for the whole network, the dynamic power pricing and power allocation involve the source node, the destination node, and the numerous relay nodes. This process requires repeated consultations between them. In heterogeneous wireless networks, each node is often able to obtain only local channel state information. Therefore, it is difficult to provide the optimal value directly, whether it is the power allocation by the source nodes or the pricing of the power price of the cooperative relay nodes. In this case, it requires the source node and all the cooperative relay nodes to negotiate repeatedly through the “the power pricing of each relay node → the power allocation → the power pricing of each relay node → the power allocation of source node” way. After several rounds, it converges to the optimal value while meeting the error requirement.

In the proposed algorithm in this paper, the power allocated by the source node to each cooperative relay node can be directly calculated by Eqs. (29) and (34). The cooperative relay node needs to recursively calculate the power price dynamically based on Eqs. (34), (37), and (38). From the following simulation results, we can see that the five recursive calculations can get very good convergence results. Therefore, the overall computational complexity is very low. From the point of view of the whole network, the changes of network environment, cooperative node center to change, and other factors will lead to the power distribution and power price changes among the cooperative nodes in the whole network. If the scale of the network is too large and the influence range between the cooperative nodes is too large, the whole network will carry out a lot of information exchange and calculation and adjustment. Therefore, the feasible method is to restrict the selection range and number of partners, which will be discussed in the simulation section later.

## 5 Simulation and result

Under the wireless distributed network scenario, this part simulated many simulations. It includes power allocation, selection of cooperative relay nodes, power pricing, and algorithm convergence in dynamic scenarios. The simulation network model in this paper includes a source node, a destination node, an eavesdropping node, and several trusted potential relay nodes. In addition, the variation of path loss is used to represent the dynamic characteristics of wireless channel. To illustrate the effect of distance (using the effect of distance to represent the change of the wireless channel information) and the channel model of any point to point is set as a sight line transmission model. The path gain can be expressed as *d*^{−c/2}*e*^{iθ}, where *d* is the distance between any two wireless nodes (unit: meter), *c* = 3.5 is the path loss exponential factor, and *θ* is a random phase distributed evenly in [0, 2*π*].

In the following simulation, it is assumed that the distance between the cooperative relay nodes is negligible relative to the distance from the source node, destination node, and eavesdropping node. The distance between the cooperative relay nodes to the source node, the destination node, and the eavesdropping node can be approximately regarded as the same. The source node and the destination node are fixed in the two-dimensional coordinate system at the point S (0, 0) and point D (100, 0), respectively (unit: meter). The noise in the channel is additive Gauss white noise, and the noise power is 10^{−10} W. The next simulation in this paper has carried out 1000 Monte Carlo independent experiments and then averages to get the average results.

*r*

_{1}is changed with its power price \( {v}_{r_1} \). It can be seen from the curve that the maximum value of \( {U}_{r_1} \) exists only.

*U*

_{S}of the source node that changes with the change of the location of the eavesdropping node (the location of the eavesdropping node moves from point (15, 0) to point (90, 0), and the relay node is fixed at the point (10, 5)). As it can be seen from Fig. 5, the farther the eavesdropping node is from the cooperative relay node, the less the total payment

*U*

_{S}of the source node is.

*U*

_{S}of the source node changing along with the location of the cooperative relay nodes is described. The location of the cooperative relay nodes changes from point (− 20, 5) to point (32, 5) along a straight line, and the eavesdropping node is at point (50, 0). As it can be seen from Fig. 6, when the cooperative relay nodes are very close to the eavesdropping node, the closer the cooperative relay nodes are to the eavesdropping node, the greater the total

*U*

_{S}of the source node will be. When the relay node is nearest to the eavesdropping node, in order to prevent the eavesdropper from eavesdropping and obtain the same security rate, the power consumption and power price of the cooperative relay node will increase. When the cooperative relay node is far away from the eavesdropper node, the more the cooperative relay node is far away from the destination node, the greater the total

*U*

_{S}of the source node is. This is because the farther the cooperative relay nodes are from the destination node, in order to get the same security rate, the source node will inevitably need to purchase more power to participate in cooperative relay to relay node with higher power price.

*U*

_{S}of the source node varies with the number of cooperative relay nodes. The eavesdropping node is fixed at point (50, 0), and the five simulation curves above correspond to the situation where the relay nodes are located at points (− 10, 5), (0, 5), (10, 5), (20, 5), and (30, 5), respectively. It is shown that the total source node payment

*U*

_{S}decreases with the increase of the number of the cooperative relay nodes. This is because the increase of the number of cooperation relay nodes will lead to more intense competition among them. As it is shown in Fig. 9, the increase of the number of cooperation relay nodes result in lower power price. Thus, the cost of the source node is inevitably reduced. Therefore, the source node always wants to seek more trustworthy relay nodes to participate in cooperation.

However, from Fig. 8, it can be seen that when the number of relay nodes involved in cooperative beamforming transmission reaches five, the total payment U_{S} will decrease slowly with the increase of the number of cooperative relay nodes. In practice, the participation of more nodes in collaboration will bring more complex communication overhead of channel state information. Therefore, it is not necessary for source nodes to seek more than six relay nodes to participate in the cooperative transmission.

Competition among cooperative nodes is conducive to the promotion of each other’s reasonable pricing of power, promotes more nodes to participate in the whole network, and promotes a more reasonable node selection and cooperation. This will help each node to find a more appropriate collaboration partner in a more appropriate way, in the appropriate scenario, thus improving the overall efficiency.

## 6 Conclusion

In this paper, third party trustworthy cooperative relay nodes were used to help forward the information of the resource nodes. At the same time, the eavesdropping was avoided by the beamforming technology. In order to reflect the dynamic characteristics of the channel in the wireless heterogeneous network and the dynamic characteristics of the relationship between the wireless nodes, and the dynamic time variation of the power allocation and the selection of the cooperative nodes, the cooperation relationship between the source nodes and the third party trustworthy cooperative relay nodes was modeled as the Stackelberg game. The relationship between relay nodes which are competing and working together was modeled as a noncooperative game. Through these two mutually progressive games, the power allocation between the source node and the cooperative relay nodes would be dynamically adjusted with the channel characteristics and the power price. It also realized the mutual restriction between the cooperative relay nodes for power pricing, and promoted the reasonable pricing of the power price. From the simulation results, it could be seen that the source node can dynamically select trusted cooperative nodes according to the channel characteristics and the power pricing of cooperative relay nodes. Due to the fact that too many cooperative nodes can cause complex channel state and other information interaction, it was suggested that there should be no more than six nodes participating in collaboration.

## Declarations

### Acknowledgements

This work was supported by the National Science Foundation of China under Grant No. 61461018, and the Hubei Province colleges and universities in the outstanding youth science and technology innovation team plan (No: T201512).

### Authors’ contributions

SLH contributed to the conception and algorithm design of the study. QYT and AXJ contributed to the acquisition of simulation. SLH, QYT, AXJ, and SJL contributed to the analysis of simulation data. All authors read and approved the final manuscript.

### Authors’ information

Shuanglin Huang received M.S. and Ph.D. degrees from the Taiyuan University of Technology and Huazhong University of Science and Technology, in 2008 and 2012, respectively. He is an assistant professor in the School of Information Engineering, Hubei University for Nationalities, Enshi, Hubei, China. His research interests lie in wireless sensor networks, wireless communications and networks, game theory, parallel computing, high-speed communication, and Internet of Things.

Qiongying Tan received a B.S. degree from Science and Technology College of Hubei Minzu University, Enshi, China, in 2018. She is a master’s graduate student in the School of Information Engineering, Hubei University for Nationalities, Enshi, Hubei, China. Her research interests lie in wireless sensor networks, wireless communication information security, Internet of Things, and high-speed communication.

Aixia Jing received a B.S. degree from Hubei University, Wuhan, China, in 2000. She is a librarian in the library of Hubei University for Nationalities, Enshi, Hubei, China. Her research interests lie in big data service mode, library and information retrieval, collaboration mode, and Internet of Things.

Sanjun Liu received M.S. and Ph.D. degrees from the University of Chinese Academy of Sciences and Peking University, Beijing, China, in 2007 and 2017, respectively. He is a lecturer in the School of Information Engineering, Hubei University for Nationalities, Enshi, Hubei, China. His research interests lie in wireless communication, embedded system, co-frequency co-time full-duplex and information theory, wireless sensor networks, parallel computing, and Internet of things.

### Competing interests

The authors declare that they have no competing interests.

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

## Authors’ Affiliations

## References

- M. Bloch, M. Barros, M. Rodrigues, S.W. McLaughlin, Wireless information-theoretic security. IEEE Trans. Inf. Theory
**54**, 2515–2534 (2008). https://doi.org/10.1109/TIT.2008.921908.MathSciNetView ArticleMATHGoogle Scholar - L. Lai, H. El Gamal, The relay-eavesdropper channel: cooperation for secrecy. IEEE Trans. Inf. Theory
**4**, 4005–4019 (2008). https://doi.org/10.1109/TIT.2008.928272.MathSciNetView ArticleMATHGoogle Scholar - A.D. Wyner, The wire-tap channel. Bell Syst. Tech. J.
**54**(8), 1355–1387 (1975).MathSciNetView ArticleGoogle Scholar - S.K. Leung-Yan-Cheong, M.E. Hellman, The Gaussian wire-tap channel. IEEE Trans. Inf. Theory
**4**, 451–456 (1978).MathSciNetView ArticleGoogle Scholar - I. Csiszar, J. Korner, Broadcast channels with confidential messages. IEEE Trans. Inf. Theory
**24**, 339–348 (1978).MathSciNetView ArticleGoogle Scholar - Y.B. Zhang, H. Dai, A real orthogonal space-time coded UWB scheme for wireless secure communications. EURASIP J. Wirel. Commun. Netw.
**2009**, 1–8 (2009). https://doi.org/10.1155/2009/571903.View ArticleGoogle Scholar - X. Lin, X. Sun, X. Wang, et al., TSVC: timed efficient and secure vehicular communications with privacy preserving. IEEE Trans. Wirel. Commun.
**7**(12), 4987–4998 (2008). https://doi.org/10.1109/T-WC.2008.070773.View ArticleGoogle Scholar - A. Mukherjee, A.L. Swindlehurst, Robust beamforming for security in MIMO wiretap channels with imperfect CSI. IEEE Trans. Signal Process.
**59**(1), 351–361 (2011). https://doi.org/10.1109/TSP.2010.2084574.MathSciNetView ArticleMATHGoogle Scholar - Q. Li, W. Ma, in
*IEEE International Conference on Communications, Kyoto*. Multicast secrecy rate maximization for MISO channels with multiple multi-antenna eavesdroppers (2011), pp. 1–5. https://doi.org/10.1109/icc.2011.5963115.View ArticleGoogle Scholar - Y. Oohama, in
*IEEE International Symposium on Information Theory*. Capacity theorems for relay channels with confidential messages (IEEE, Nice, 2007), pp. 926–930. https://doi.org/10.1109/ISIT.2007.4557113.View ArticleGoogle Scholar - X. He, A. Yener, Cooperation with an untrusted relay: a secrecy perspective. IEEE Trans. Inf. Theory
**56**(8), 3807–3827 (2010). https://doi.org/10.1109/TIT.2010.2050958.MathSciNetView ArticleMATHGoogle Scholar - L. Dong, Z. Han, A.P. Petropulu, et al., Improving wireless physical layer security via cooperating relays. IEEE Trans. Signal Process.
**58**(3), 1875–1888 (2010). https://doi.org/10.1109/TSP.2009.2038412.MathSciNetView ArticleMATHGoogle Scholar - L. Jiangyuan, P. Petropulu Athina, W. Steven, On cooperative relaying schemes for wireless physical layer security. IEEE Trans. Signal Process.
**59**(10), 4985–4997 (2011). https://doi.org/10.1109/TSP.2011.2159598.MathSciNetView ArticleMATHGoogle Scholar - S.L. Huang, J.L. Wei, Y. Cao, C. Liu, in
*The 7th International Conference on Wireless Communications, Networking and Mobile Computing*. Joint decode-and-forward and cooperative jamming for secure wireless communications (2011). https://doi.org/10.1109/wicom.2011.6040145.View ArticleGoogle Scholar - J. Huang, A.L. Swindlehurst, Cooperative jamming for seeure communieations in MIMO relay networks. IEEE Trans. Signal Process.
**59**(10), 4871–4884 (2011). https://doi.org/10.1109/TSP.2011.2161295.MathSciNetView ArticleMATHGoogle Scholar - H.M. Wang, Q.Y. Yin, X.G. Xia, Distributed beamforming for physical-layer security of two-way relay networks. IEEE Trans. Signal Process.
**60**(7), 3532–3545 (2012). https://doi.org/10.1109/TSP.2012.2191543.MathSciNetView ArticleMATHGoogle Scholar - J. Chen, R. Zhang, L. Song, et al., Joint relay and jammer selection for secure two-way relay networks. IEEE Trans. Inf. Theory
**7**(1), 310–320 (2012). https://doi.org/10.1109/TIFS.2011.2166386.View ArticleGoogle Scholar - J. Chen, L. Song, Z. Han, et al., in
*2011 IEEE Global Telecommunications Conference - GLOBECOM 2011, Houston*. Joint relay and jammer selection for secure deeode-and-forward two-way relay communications (2011), pp. 1–5. https://doi.org/10.1109/GLOCOM.2011.6133875.View ArticleGoogle Scholar - C. Shahriar, M. La Pan, M. Lichtman, T. Charles Clancy, R. McGwier, R. Tandon, S. Sodagari, J.H. Reed, PHY-layer resiliency in OFDM communications: a tutorial. IEEE Commun. Surv. Tutorials
**17**(1), 292–314 (2015). https://doi.org/10.1109/COMST.2014.2349883.View ArticleGoogle Scholar - Z. Han, N. Marina, M. Debbah, et al., in
*International Conference on Game Theory for Networks*. Physical layer security game: how to date a girl with her boyfriend on the same table ([s. n.], Istanbul, 2009), pp. 287–294. https://doi.org/10.1109/GAMENETS.2009.5137412.View ArticleGoogle Scholar - Z. Rongqing, S. Lingyang, H. Zhu, in
*2011 IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS)*. Improve physical layer security in cooperative wireless network using distributed auction game ([s. n.], Shanghai, 2011), pp. 18–23. https://doi.org/10.1109/INFCOMW.2011.5928805.View ArticleGoogle Scholar - Q. Zhu, W. Saad, Z. Han, et al., in
*Proceedings of the Military Communications Conference Track 1 Waveforms and Signal Processing*. Eavesdropping and jamming in next-generation wireless networks: a game-theoretic approach (2011), pp. 119–124. https://doi.org/10.1109/MILCOM.2011.6127463.View ArticleGoogle Scholar - W. Saad, Z. Han, T. Basar, M. Debbah, A. Hjrungnes, Hedonic coalition formation for distributed task allocation among wireless agents. IEEE Trans. Mob. Comput.
**10**(9), 1327–1344 (2011). https://doi.org/10.1109/TMC.2010.242.View ArticleGoogle Scholar - R. Zhang, L. Song, H. Zhu, et al., Physical layer security for two-way untrusted relaying with friendly jammers. IEEE Trans. Veh. Technol.
**61**(8), 3693–3704 (2012). https://doi.org/10.1109/TVT.2012.2209692.View ArticleGoogle Scholar - S. Huang, A. Jing, J. Tan, J. Xu, Subcarrier allocation and cooperative partner selection based on nash bargaining game for physical layer security in OFDM wireless networks. Concurr. Comput.
**29**(3), 1–15 (2017). https://doi.org/10.1002/cpe.3790.View ArticleGoogle Scholar - S. Huang, L. Zhu, S. Liu, Based on virtual beamforming cooperative jamming with Stackelberg game for physical layer security in the heterogeneous wireless network. EURASIP J. Wirel. Commun. Netw.
**69**, 1–11 (2018). https://doi.org/10.1186/s13638-018-1081-x.View ArticleGoogle Scholar - G. Owen,
*Game theory*, 3rd edn. (Academic, New York, 2001), pp. 120–200.Google Scholar - F.J. Solis, R.J.-B. Wets, Minimization by random search techniques. Math. Oper. Res.
**6**, 19–30 (1981).MathSciNetView ArticleGoogle Scholar