blob: ff73ca724f6c13b12bd9d84fe9b73fcc69b6bffa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
//example 5.4.1
//Calculate the bitrate ,Symbol rate BW and BER values
//Variables
clc
clear
CN = 25
NoiseBw = 1.0
r=0.3
Rs = 1
Bocc = Rs*(1+r)
rainattenuation = 3
printf("The occupied bandwidth of the RF signal is %f Mhz \n",Bocc)
//BPSK
Rb = 1
printf("The bit rate is %f Mbps \n",Rb)
BERclearair = erfc((2*CN)^(1/2))
printf("BER in clear air for BPSK is %f \n Since the all BER values are -ve high orders \n the BER values are shown zero\n",BERclearair)
//QPSK
Rb1 = 2*Rs
printf("The bit rate for QPSK is %f Mbps \n",Rb1)
BERclearair1 = erfc((CN)^(1/2))
printf("BER in clear air for QPSK is %f \n",BERclearair1)
CN1 = CN - rainattenuation
//BPSK
BERrain = erfc((2*CN1)^(1/2))
printf("BER in rain for BPSK is %f \n",BERrain)
//QPSK
BERrain1 = erfc((CN1)^(1/2))
printf("BER in rain for BPSK is %f \n",BERrain1)
|