Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PSD of BASK in MATLAB

Status
Not open for further replies.

Mustaine

Member level 1
Joined
Mar 27, 2021
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
214
Hello friends i am trying to plot the PSD of BASK in MATLAB.
the specifications of the signals as follows:
Number of data bits (1s and 0s) = 100
Sampling frequency fs = 100 Hz
Number of data points (samples) = 100*fs = 10 000 data points
block size of FFT, N = 4096
Bit duration Tb = 1s
Carrier frequency fc = 4 Hz

The matlab code i wrote (incomplete) as follows:
Code:
f_sampling=100;
t=0: 1/f_sampling: 1-1/f_sampling;
fc=4;
Tb=1;
Ac=sqrt(2/Tb);
c=Ac*cos(2*pi*fc*t);

i could not specify the incoming binary wave whose amplitude is sqrt(Eb) and 0 for binary 1 and 0 respectively.

the outcome should be as follows

the example is taken from an introduction to analog and digital communication by moher and simon.

thanks in advance
 

Attachments

  • pic5.JPG
    pic5.JPG
    32.5 KB · Views: 155

Try this in Octave:

pkg load communications
b = randsrc(1,100,[0 1/sqrt(2)]);
bb = repmat(b,100,1);
x = reshape(bb,1,10000);

f = cos(2*pi*(0:10000-1)*4/100);
y = f.*x;
periodogram(y,hann(length( y ),"symmetric"),4096,100)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top