| | Step 1: input parameters |
| | |
| | Step 2: initialization of the probability matrices |
| | For |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | Step 3: calculate missed detection probability |
| | |
| | Step 4: calculate total error probability |
| | |
| | Step 5: initialization |
| | Initialize the matrix for storing the values of: |
| | //Application of space-time coding process// |
| | Step 6: apply the space-time trellis coding |
| | Follow the process in Algorithm 2 |
| | Step 7: apply the multilevel space-time trellis coding |
| | Follow the process in Algorithm 3 |
| | Step 8: apply the group multilevel space-time trellis coding |
| | Follow the process in Algorithm 4 |
| | //Application of space-time coded signal on the cognitive radio scenario// |
| | For i = 1 : 1 : rel |
| | Step 9: initialize SNR and convert to linear phase |
| | |
| | //dB to linear phase conversion// |
| | Step 10: generation of the signal and adding of noise variance |
| | Generate the signal (s) |
| | Add Rayleigh Fading |
| | |
| | Add noise variance () |
| | Step 11: signal energy calculation |
| | |
| | Step 12: calculation of SNR |
| | Eb/No calculation |
| | ; |
| | Signal when PU is present |
| | (H1, H1) |
| | Signal when PU absent |
| | ; (H0, H0) |
| | Add time-delay bandwidth product |
| | ; |
| | Step 13: calculation of energy when PU absent |
| | //H0 hypothesis// |
| | Step 14: calculation of energy when primary is present |
| | //H1 hypothesis// |
| | Step 15: calculate the global probability of detection (calculate Pdc and Pfc using E1 and E0) |
| | If |
| | |
| | //probability of detection// |
| | Else |
| | End |
| | Step 16: calculate the global probability of false alarm |
| | If |
| | |
| | ; //probability of false alarm// |
| | Else |
| | End |
| | End |
| | Calculate Pd and Pf using Pdc and Pfc |
| | |
| | |
| | Step 17: detection and false alarm signal evaluation/optimization |
| | For l = n: 1: K |
| | Step 18: calculate the global probability of detection |
| | |
| | Step 19: calculate the global probability of false alarm |
| | |
| | End |
| | Step 20: calculate missed detection probability |
| | |
| | Step 21: calculate total error probability |
| | |
| | End |
| | Calculate BER |
| | End |
| | End |