Question

Use the Matlab code discussed in class to build a simulator for the digital modulation scheme PPM Coherent. Once finished, run the simulations required to plot BER curves with a minimum probability of...

Use the Matlab code discussed in class to build a simulator for the digital modulation scheme PPM Coherent. Once finished, run the simulations required to plot BER curves with a minimum probability of bit-error of 10.

1. Plots:

a.

0 0
Answer #1

IF YOU HAVE ANY DOUBTS COMMENT BELOW I WILL BE THERE TO HELP YOU ALL THE BEST.

Answer:

Explanation:

CODE:

Answer for 1-a

clc;          //it clears the data

clear all; //clears all the pervious data

close all; //closes all the pervious data

b=101;    //bit rate

data=randint(1,b);%random bit generation (1 or 0)

s=2*data-1

SNRdB=0:9;         //signal to noise ratio I db

SNR=10.^(SNRdB/10);

for(k=1:length(SNRdB))

y=s+awgn(s,SNRdB(k));      //y signal representation

error=0;

for(c=1:1:b)

    if (y(c)>0&&data(c)==0)||(y(c)<0&&data(c)==1)

        error=error+1;               //increment the error value

    end

end

error=error/b; %Calculate error/bit

m(k)=error;            //mk signal wil end here

end

figure(1)

semilogy(SNRdB,m,'r','linewidth',2),grid on,hold on;

BER_th=(1/2)*erfc(sqrt(SNR));          //square of the bit rate

semilogy(SNRdB,BER_th,'k','linewidth',2);

title(' curve for Bit Error Rate verses SNR for Binary PSK modulation');

xlabel(' SNR(dB)');

ylabel('BER');        //y labei reperesentation

legend('simulation','theorytical')

Answr for 1-b:

clear all; //clears all the pervious data

close all; closes all the pervious data

T=1;     /t value representation

b=[1 0 1];        //bit rate

NRZ_out=[];

Vp=1;

for index=1:size(b,2)

if b(index)==1

NRZ_out=[NRZ_out ones(1,200)*Vp]; //non return zero value

elseif b(index)==0

NRZ_out=[NRZ_out ones(1,200)*(-Vp)];

end

end//some the prog end herev

figure(1);

stem(b);

xlabel('Time (seconds)-->')

ylabel('Amplitude (volts)-->')

title('Impulses of bits to be transmitted');

figure(2);

plot(NRZ_out);//ploting th nrz plot

xlabel('Time (seconds)-->');

ylabel('Amplitude (volts)-->');

title('Generated NRZ signal');

t=0.005:0.005:5;

f=5;

s=NRZ_out.*(sqrt(2/T)*cos(2*pi*f*t));

figure;

plot(s);

xlabel('Time (seconds)-->');

ylabel('Amplitude (volts)-->');

title('BPSK Modulated signal'); //representing of the title

answer for 1- c

y=[];

demodulated=Modulated.*(sqrt(2/T)*cos(2*pi*f*t));

for i=1:200:size(demodulated,2)

y=[y trapz(t(i:i+199),demodulated(i:i+199))];

end

received=y>0;

figure;

stem(received)

title('Impulses of Received bits');

xlabel('Time (seconds)-->');     //xlabel representation

ylabel('Amplitude (volts)')

Eb_N0_dB = 0 ;

Eb_N0=10^(Eb_N0_dB/10);

M=2;//representing the m-value

fs=1000;

T=1;

Ts=T/log2(M); //ts value

R=1/Ts;

A=5;

E=A^2*T;

ts=1/fs;

t=0:ts:1

noiseVariance=E*fs/(2*log2(M)*Eb_N0);

sigma_n=sqrt(noiseVariance);

n = sigma_n*randn(1,length(s));

r = s+n ;% received noisy signal array

subplot(4,1,4);

plot(t,r);           //plot the t,r signals

axis([0 MaxPlotTime min(r) max(r)]);

grid on;//it will terminate here

xlabel('time');

ylabel('r(t)');

title('Received Bandpass BPSK signal r(t)'); //representing the title

PLS ..RATE THUMBSUP IT HELPS ME ALOT

THANKS GOODLUCK

THANK YOU....!

Know the answer?
Add Answer to:
Use the Matlab code discussed in class to build a simulator for the digital modulation scheme PPM Coherent. Once finished, run the simulations required to plot BER curves with a minimum probability of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT