You are on page 1of 2
Sec C ADC Lab 11 In this lab, you will perform the following tasks: 1. Write MATLAB code for finding Signal/Noise power, for transmitting generated signal, for noise generation, for received signal, for signal detection, and for BER plot. MATLAB code will be checked in manual submission. 2. Code’s output curve must match the range & domain of curve shown in Figure N=10*6; % Number of Symbols rand('state’, 108); % Generating Random Function randn(' state’ ,20@); % Generating another Random Function xerand(1,N)>0.5; S=2*x-1 XBPSK Modulation kd ak a a a a a a n=1/sqrt(2)*[randn(1,N)41i*randn(1,N)] Xwhite Gaussion Noice 1.3137 = @.02261 0.4648 - ©.20031 0.0404 + 0.34181 0.1017 + @.38031 0.4181 - 0.905 SNR=[0: 10] —_XSNR Multiple Values with 1 difference SNR = e 1 2 3 4 $ 6 7 8 8 2 for a = 1:length(SNR) %Noice Addition y = S + 10*(-SNR(a)/20)*n ; %Additive White gaussion Noice X = real(y)>05 error(a) = size(find([x-x]),2); Counting Error end BER-error/N %Bit Error Rate BER = 0.0791 0.0565 0.0377 0.0230 8.0125 @.0059 0.0024 © @.0008 «0.0002 semi logy (SNR, BER, 'm’); axis([@ 1@ 10*-6 10*-1]) grid on Legend(‘ simulation’); xlabel( (a8) ') ylabel(*BER"); title('Curve for Bit error Rate (BER) verses SNR for binary PSK Modulation"); {Sutve for Bit error Rate (BER) verses SNR for binary PSK Modulation simulation BER (dB) Conclusion: In this Lab we performed un-coded Binary Phase Shift Keying (BPSK) or Binary antipodal signal in AWGN channel and our resultant graph is similar to the desired graph shown in lab Manual

You might also like