Question

In: Electrical Engineering

Write a Matlab code for PSK modulation of Polar signal full widht rectangular pulses and data...

Write a Matlab code for PSK modulation of Polar signal full widht rectangular pulses and data rate 1 mbit/s also find PSD of psk and estimate Bandwidth

Solutions

Expert Solution

%>>>>>>>>> MATLAB code for binary PSK modulation and de-modulation >>>>>>>%

clc;
clear all;
close all;


x=[ 1 0 0 1 1 0 1];                                    % Binary Information
bp=.000001;                                                    % bit period
disp(' Binary information at Trans mitter :');
disp(x);

%XX representation of transmitting binary information as digital signal XXX
bit=[]; 
for n=1:1:length(x)
    if x(n)==1;
       se=ones(1,100);
    else x(n)==0;
        se=zeros(1,100);
    end
     bit=[bit se];

end
t1=bp/100:bp/100:100*length(x)*(bp/100);
subplot(3,1,1);
plot(t1,bit,'lineWidth',2.5);grid on;
axis([ 0 bp*length(x) -.5 1.5]);
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('transmitting information as digital signal');



%XXXXXXXXXXXXXXXXXXXXXXX Binary-PSK modulation XXXXXXXXXXXXXXXXXXXXXXXXXXX%
A=5;                                          % Amplitude of carrier signal 
br=1/bp;                                                         % bit rate
f=br*2;                                                 % carrier frequency 
t2=bp/99:bp/99:bp;                 
ss=length(t2);
m=[];
for (i=1:1:length(x))
    if (x(i)==1)
        y=A*cos(2*pi*f*t2);
    else
        y=A*cos(2*pi*f*t2+pi);   %A*cos(2*pi*f*t+pi) means -A*cos(2*pi*f*t)
    end
    m=[m y];
end
t3=bp/99:bp/99:bp*length(x);
subplot(3,1,2);
plot(t3,m);
xlabel('time(sec)');
ylabel('amplitude(volt)');
title('waveform for binary PSK modulation coresponding binary information');




%XXXXXXXXXXXXXXXXXXXX Binary PSK demodulation XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
mn=[];
for n=ss:ss:length(m)
  t=bp/99:bp/99:bp;
  y=cos(2*pi*f*t);                                        % carrier siignal 
  mm=y.*m((n-(ss-1)):n);
  t4=bp/99:bp/99:bp;
  z=trapz(t4,mm)                                              % intregation 
  zz=round((2*z/bp))                                     
  if(zz>0)                                        % logic level = (A+A)/2=0 
                         %becouse A*cos(2*pi*f*t+pi) means -A*cos(2*pi*f*t)
    a=1;
  else
    a=0;
  end
  mn=[mn a];
end
disp(' Binary information at Reciver :');
disp(mn);


%XXXXX Representation of binary information as digital signal which achived 
%after PSK demodulation XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
bit=[];
for n=1:length(mn);
    if mn(n)==1;
       se=ones(1,100);
    else mn(n)==0;
        se=zeros(1,100);
    end
     bit=[bit se];

end
t4=bp/100:bp/100:100*length(mn)*(bp/100);
subplot(3,1,3)
plot(t4,bit,'LineWidth',2.5);grid on;
axis([ 0 bp*length(mn) -.5 1.5]);
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('recived information as digital signal after binary PSK demodulation');



%>>>>>>>>>>>>>>>>>>>>>>>>>> end of program >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>%


Related Solutions

pls, I need Matlab code for, OFDM modulation (Matlab demo by at least 4 carriers)
pls, I need Matlab code for, OFDM modulation (Matlab demo by at least 4 carriers)
Use the Matlab code discussed in class to build a simulator for the digital modulation scheme...
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. ??? vs ??? (??) plot – in the same graph, plot at least 4 BER curves corresponding to different values of symbol periods and pulse widths. b. Transmitted signal plot – plot the transmitted signal corresponding to 3 bits. c. Received...
Use the Matlab code discussed in class to build a simulator for the digital modulation scheme...
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. ??? vs ??? (??) plot – in the same graph, plot at least 4 BER curves corresponding to different values of symbol periods and pulse widths. b. Transmitted signal plot – plot the transmitted signal corresponding to 3 bits. c. Received...
Conciderer the full-width rectangular pulses p(t). the rms value of AWGN is 10^-3V. A) Determine the...
Conciderer the full-width rectangular pulses p(t). the rms value of AWGN is 10^-3V. A) Determine the necessary (minimmum) signal power such that the detection error probability is less the than 10^-5 when polar signaling is used. B) repeat the problem for on-off signaling. C) repeat the problem for bipolar signaling. D) make your comments. NOTE: Q (4.26)= 10^-5 , Q(4.36)= 0.67x10-5
Using Matlab, write code to generate Three signal components We will use a sum of sinusoids,...
Using Matlab, write code to generate Three signal components We will use a sum of sinusoids, all of which are sampled at 10 kHz. Signal 1 should contain a sum of sinusoids with frequencies at 25Hz, 40Hz and 75Hz. Signal 2 should contain a sum of sinusoids with frequencies at 600Hz, 730Hz, and 800Hz. Signal 3 should contain a sum of sinusoids with frequencies at 3500Hz, 4000Hz, and 4200Hz. Choose a variety of amplitudes and phase shifts for the sinusoids....
I need a matlab code for my presentation. Code should include Single Sideband Amplitude Modulation and...
I need a matlab code for my presentation. Code should include Single Sideband Amplitude Modulation and Demodulation. It should figure 3 things: -time domain of given message signal in Amplitude Modulation and Single Sideband Amplitude Modulation -frequency domain of given signal in Amplitude Modulation and Single Sideband Amplitude Modulation -And it should demodulate and show message signal.
Need explanation of MATLAB code which creates echo. (SIGNAL PROCESSING) If the original audio signal is...
Need explanation of MATLAB code which creates echo. (SIGNAL PROCESSING) If the original audio signal is x(t) then the echo is y(t) = x(t) + alpha*x(t-delay) This code below creates this echo however I don't understand how every line of the code works, could someone comment this code so I can understand? [x,Fs] = audioread('Hallelujah.wav'); sound(x,Fs); delay = 0.5; % 0.5s delay alpha = 0.65; % echo strength D = delay*Fs; y = zeros(size(x)); y(1:D) = x(1:D); for i=D+1:length(x) y(i)...
assume that the data are stored in variable names x and y. write a matlab code...
assume that the data are stored in variable names x and y. write a matlab code to plot the quadratic spline and along with the data points x= 1 2 3 4 5 6 y= 40 78 125 256 348 425
Matlab Code that does the following: Takes as input 3 frequencies. Create a signal that is...
Matlab Code that does the following: Takes as input 3 frequencies. Create a signal that is a mixture of the 3 signals. Create a bandpass filter that only selects the center frequency. Output the filtered signal which contains only the middle frequency. Plot in time and frequency domain the original signal and the filtered signal. Show the output for filter order 1 and 15. Upload a pdf of the image files. Each figure should have your name in the title...
write the code in MATLAB with comments and show the inputs and results of the code...
write the code in MATLAB with comments and show the inputs and results of the code for the question below. Write an .m file in MATLAB, that records audio (you can record your own voice for 20 seconds that was recorded using your phone), then take Fourier transform of the signal (probably FFT).
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT