# An Energy-Efficient Game-Theory-Based Spectrum Decision Scheme for Cognitive Radio Sensor Networks
## 3 Energy-Efficient Game-Theory-Based Spectrum Decision
### Data Transmission Mode (D Mode)
#### 3.3.2 Spectrum Decision Module of D Mode  
The tasks in spectrum decision module of D mode are similar with C mode, except that in D mode some of the tasks are shorter because the sensor nodes update the information regarding two channels of operating and backup channels. All sensor nodes (CHs and CMs) perform spectrum characterization, and the underlying tasks are the same as in C mode. However, in D mode, sensor nodes only characterize the operating channel and backup channel. The SNR calculation for unlicensed channels (\(SNR^{\prime}\)) is as follows:  
\[SNR^{\prime}_{y}=P_{highestnoise}-(P_{noise})_{y} \tag{32}\]  
Figure 5: Spectrum sensing module. where \(P_{highestnoise}\) is the maximum noise level, and (\(P_{noise}\))\({}_{y}\) is the actual noise level on channel \(B_{y}\). (\(SNR^{\prime}_{y}\) is not actually a ratio.) The channel status update is as follows: if \(SNR^{\prime}_{y}\) is higher than a predetermined threshold, \(SNR^{\prime}_{thres}\), then:  
\[Status(B_{y})_{i}=(clean) \tag{33}\]  
otherwise:  
\[Status(B_{y})_{i}=(noisy) \tag{34}\]  
Spectrum sensing on unlicensed channels are not performed unless the channels ever become an operating or backup channel (operating/backup channel sensing is performed in partial spectrum sensing). Thus, for other licensed channels:  
\[Status(B_{y})_{i}=(unknown) \tag{35}\]  
In case of unlicensed channels, channel holding time is defined as the expected \"time\" that the channel will remain clean. Similarly, a Markov chain is created for each unlicensed channel, as shown in Figure 6.  
Only the Markov chains for operating and backup channels are updated. The value (\(1-p^{\prime}\)) is the probability of a clean channel to remain clean and it is considered to calculate the channel holding time as follows: If (\(1-p^{\prime}\))\({}^{\prime}\)\(>\)\(p^{\prime}_{thres}\), \(t\)\(\geq\) 1, and \(t_{max}\)\(\geq\) 1, then:  
\[\left(CHT^{\prime}_{y}\right)_{f}=\left(CHT^{\prime}_{y}\right)_{fprev}+\sum _{t=1}^{t_{\max}}1 \tag{36}\]  
where (\(CHT^{\prime}_{y}\))\({}_{f}\) and (\(CHT^{\prime}_{y}\))\({}_{fprev}\) are the channel holding times on channel \(B_{x}\) for the current frame and the previous frames, respectively. The term (\(1-p^{\prime}\))\({}^{\prime}\) is the probabilities that an idle channel will remain idle or a clean channel will remain clean, for time \(t\), \(p^{\prime}_{thres}\) is a predetermined probabilities, and \(t_{max}\) is the highest integer for which the statements (\(1-p^{\prime}\))\({}^{\prime}\)\(>\)\(p^{\prime}_{thres}\) is still valid. If (\(1-p^{\prime}\)) \(<\)\(p^{\prime}_{thres}\), then:  
\[\left(CHT^{\prime}_{y}\right)_{f}=\frac{1}{2}\left(CHT^{\prime}_{y}\right)_{ fprev} \tag{37}\]  
If \(p^{\prime}\) = 0, then:  
\[\left(CHT^{\prime}_{y}\right)_{f}=\left(CHT^{\prime}_{y}\right)_{fprev}+CHT^{ \prime}_{\max} \tag{38}\]  
where \(CHT^{\prime}_{max}\) is a predetermined constant. Similarly, in D mode, spectrum selection tasks are performed only by the CHs. However, the outcome of spectrum selection in D mode is a decision whether the current operating channel can be used or needs to be changed. Figure 6: Markov chain for an unlicensed channels (\(p^{\prime}\) = probability that a clean channel becomes noisy, and \(q^{\prime}\) = probability that a noisy channel becomes clean). Spectrum selection in D mode also divides the CHs into four types depending on the conditions of the operating channel and the backup channel. The CH types are:  
\[Type(CH)_{i}=\left\{ \begin{array}{ll}1&\text{if }status(C_{i})_{fprev}=(available)\\ 1&\text{and }status(C^{\prime}_{i})_{fprev}=(available)\\ 2&\text{if }status(C_{i})_{fprev}=(available)\\ 2&\text{and }status(C^{\prime}_{i})_{fprev}=(obsolete)\\ 3&\text{if }status(C_{i})_{fprev}=(obsolete)\\ 3&\text{and }status(C^{\prime}_{i})_{fprev}=(available)\\ 4&\text{if }status(C_{i})_{fprev}=(obsolete)\\ &\text{and }status(C^{\prime}_{i})_{fprev}=(obsolete)\\ \end{array} \right.