Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Could anyone help me do this problem? Assuming that the data rate rb is 1 bit/se

ID: 1847418 • Letter: C

Question


Could anyone help me do this problem?

Assuming that the data rate rb is 1 bit/sec and bit duration, T-1 sec. Since it is BPSK, the symbol rate rs is l symbol/sec, and -r, r l. Choose the residual carrier frequency fo 2 Hz. Design and simulate the transmitter at the baseband operation. The NRZ data can be generated by using a random number generator. The sampling frequency of the data is chosen to be 16* rs. The same sampling frequency is also applied to the tone generator, which represents the residual carrier frequency. Plot the waveform of Si(n)

Explanation / Answer

clc

close all

clear all


len=10; % No of bits =50

L=16; % No of samples per bit

Tb=1; % bit Duration 1 micro second

fc=2; % carrier frequency

I=randi(2,1,50)-1; % I channel bits

Q=randi(2,1,50)-1; % Q channel bits

for i=1:len

if(I(i)==0)

I(i)=-1;

end

if(Q(i)==0)

Q(i)=-1;

end

end

Tsamples=Tb/L; % interval between two samples in time

A=zeros(1,L*len); % I channel samples

B=zeros(1,L*len); % Q channel samples

t=zeros(1,L*len); % time t in secs

sig=zeros(1,len*L); % BPSK signal sig(t)

for i=1:len

for j=1:L

A((i-1)*L+j)=I(i);

B((i-1)*L+j)=Q(i);

end

end


for i=1:len

for j=1:L

t((i-1)*L+j)=(i-1)*Tb+j*Tsamples;

end

end


c=cos(2*pi*fc*t); % cosine carrier (In phase)


for i=1:len*L

sig(i)=A(i)*c(i); % Sample by sample multiplication and addition of I and Q channel to obtain the BPSK Signal

end

figure;

plot(t,sig); % Plot of BPSK signal

title('BPSK signal');

xlabel('time');

ylabel('amplitude');

del_f=2*pi/length(sig);

f=0:del_f:2*pi-del_f; % Normalized frequency

figure;

plot(f,abs(fft(sig))); % Plot of Spectrum of the BPSK signal

title('Magnitude Spectrum of QPSK signal');

xlabel('Normalized frequency');

ylabel('amplitude');