SlideShare a Scribd company logo
function DemBPSK(x,fc,fs,br,N,Time)

Ts=1/fs;
onebit=fs/br; %number of samples per bit (one sample is constituent of # bits)
b=onebit;
n=round((length(x)-1)/onebit); %the bits transmitted
c=1;
k=[];


for m=1:n;                   % iteration from 1 to number of bits(blocks)
y=x(c:b);                    % take the part of the needed signal for one bit
(eg. 1st block)
q=sin(2*pi*((c:b)-1)*fc*Ts); %reference signal for Quadrature**Taking first part
of cos x
%figure;
%plot(q);
i=-sin(2*pi*((c:b)-1)*fc*Ts); % reference signal with -sin ->Inphase
a=y.*q;                        % (received signal(1st block)) . (reference signal
for Quadrature) ** cos(x)*m(t)
d=y.*i;                        % (received signal(in phase, 1st block)) .
(reference signal for Inphase)
t= sum(a)-sum(d);              % accumulative effect of first block
if t>0;
     p=ones(1);                %ones (binary)
else
     p=zeros(1);               %zeros
end

k=[k p];    %accumulate the value of output into k
b=b+onebit; %update the value of b for the next input (next block)
c=c+onebit; %update the value of c for the next input (2, next block)
end

figure;
subplot(3,1,1);
plot(x);grid on;
title('BPSK Data at Receiver');
axis([0 length(x) -1 1]);

subplot(3,1,2)      %plot the output (bpsk signal)
nn=0:n-1;
plot(nn,k,'LineWidth',1);
xlabel('N');
ylabel('Binary Data');
title('BPSK DeModulated Data');
axis([0 N+1 -0.5 1.5]);
grid on;
[r]=data_received(k,Ts);

subplot(3,1,3)
stem(nn,r);
xlabel('Samples');
ylabel('Binary Data');
axis([0 N -0.5 1.5]);
title('Received Signal');
receivedString=bin2str(r);
disp(receivedString)

More Related Content

DOC
bask, bfsk, bpsk
PDF
Mpmc unit-string manipulation
DOC
Digitla Communication pulse shaping filter
PDF
Lesson 5 Nov 3
PDF
Matlab integration
PDF
Mid term solution
PDF
Python grass
PPTX
K10692 control theory
bask, bfsk, bpsk
Mpmc unit-string manipulation
Digitla Communication pulse shaping filter
Lesson 5 Nov 3
Matlab integration
Mid term solution
Python grass
K10692 control theory

What's hot (18)

PDF
Multi dimensional profiling
PPTX
Cyclic code systematic
PDF
Discovering human places of interest from multimodal mobile phone data
DOCX
Lab 1 izz
PPT
Graphing day 1 worked
PDF
Matlab 2
PPT
4.5 tan and cot.ppt worked
PPT
asymptotic notations i
DOCX
CRCof Computer Network Laboratory
PDF
Matlab bode diagram_instructions
PDF
Derivatives Lesson Oct 14
PDF
Ece512 h1 20139_621386735458ece512_test2_solutions
PPT
Turinworkshop 2 Leung
PDF
E 2017 1
DOCX
PPTX
IOEfficientParalleMatrixMultiplication_present
PDF
Concurrency in Go by Denys Goldiner.pdf
Multi dimensional profiling
Cyclic code systematic
Discovering human places of interest from multimodal mobile phone data
Lab 1 izz
Graphing day 1 worked
Matlab 2
4.5 tan and cot.ppt worked
asymptotic notations i
CRCof Computer Network Laboratory
Matlab bode diagram_instructions
Derivatives Lesson Oct 14
Ece512 h1 20139_621386735458ece512_test2_solutions
Turinworkshop 2 Leung
E 2017 1
IOEfficientParalleMatrixMultiplication_present
Concurrency in Go by Denys Goldiner.pdf
Ad

Viewers also liked (15)

DOCX
Bpsk simulation
PDF
EEP306: Binary phase shift keying
PDF
Hardware co simulation of bpsk and qpsk
PDF
Simulation example with matlab
PDF
Binary phase shift keying (bpsk)
PDF
PSK and It's Schemes (using MATLAB)
DOC
Matlab code
PPTX
PSK (PHASE SHIFT KEYING )
PPTX
Phase shift keying Presentation
PPTX
Matlab source codes section | Download MATLAB source code freerce-codes
PPSX
Phase shift keying(PSK)
PPT
Digital modulation
PPT
Digital modulation
PPT
Digital modulation techniques
Bpsk simulation
EEP306: Binary phase shift keying
Hardware co simulation of bpsk and qpsk
Simulation example with matlab
Binary phase shift keying (bpsk)
PSK and It's Schemes (using MATLAB)
Matlab code
PSK (PHASE SHIFT KEYING )
Phase shift keying Presentation
Matlab source codes section | Download MATLAB source code freerce-codes
Phase shift keying(PSK)
Digital modulation
Digital modulation
Digital modulation techniques
Ad

Similar to Demodulation bpsk up (20)

DOC
Askpskfsk program matlab
DOCX
Digital communication telecommunication lab ksit
PDF
Experiment3_DCS-21BEC0384Adityabonnerjee
PDF
Comm lab manual_final
PDF
Comm lab manual_final-1
PDF
PPG_FSK.pdf
PDF
Matlab kod taslağı
PPTX
DSP_DiscSignals_LinearS_150417.pptx
PDF
Multirate sim
PDF
Solutions for Exercises in Digital Signal Processing Using MATLAB, 4th Editio...
PDF
Dsp lab manual
PDF
Matlab 3
PDF
DSP Lab 1-6.pdf
PDF
Reconstruction
PDF
Adv. Digital Signal Processing LAB MANUAL.pdf
PDF
Matlab programs
PDF
PDF
Dsp file
DOC
Laboratorio vibra
Askpskfsk program matlab
Digital communication telecommunication lab ksit
Experiment3_DCS-21BEC0384Adityabonnerjee
Comm lab manual_final
Comm lab manual_final-1
PPG_FSK.pdf
Matlab kod taslağı
DSP_DiscSignals_LinearS_150417.pptx
Multirate sim
Solutions for Exercises in Digital Signal Processing Using MATLAB, 4th Editio...
Dsp lab manual
Matlab 3
DSP Lab 1-6.pdf
Reconstruction
Adv. Digital Signal Processing LAB MANUAL.pdf
Matlab programs
Dsp file
Laboratorio vibra

Recently uploaded (20)

PPTX
An introduction to AI in research and reference management
PPTX
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
PPTX
NEW EIA PART B - Group 5 (Section 50).pptx
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PPTX
HPE Aruba-master-icon-library_052722.pptx
PPT
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
PPTX
EDP Competencies-types, process, explanation
PPTX
Special finishes, classification and types, explanation
PDF
Test slideshare presentation for blog post
PDF
YOW2022-BNE-MinimalViableArchitecture.pdf
PDF
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
PDF
Pongal 2026 Sponsorship Presentation - Bhopal Tamil Sangam
PPTX
Entrepreneur intro, origin, process, method
PDF
ART & DESIGN HISTORY OF VEDIC CIVILISATION.pdf
PDF
Chalkpiece Annual Report from 2019 To 2025
PDF
Quality Control Management for RMG, Level- 4, Certificate
PDF
The Basics of Presentation Design eBook by VerdanaBold
PDF
Skskkxiixijsjsnwkwkaksixindndndjdjdjsjjssk
PPTX
2. Competency Based Interviewing - September'16.pptx
PDF
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
An introduction to AI in research and reference management
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
NEW EIA PART B - Group 5 (Section 50).pptx
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
HPE Aruba-master-icon-library_052722.pptx
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
EDP Competencies-types, process, explanation
Special finishes, classification and types, explanation
Test slideshare presentation for blog post
YOW2022-BNE-MinimalViableArchitecture.pdf
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
Pongal 2026 Sponsorship Presentation - Bhopal Tamil Sangam
Entrepreneur intro, origin, process, method
ART & DESIGN HISTORY OF VEDIC CIVILISATION.pdf
Chalkpiece Annual Report from 2019 To 2025
Quality Control Management for RMG, Level- 4, Certificate
The Basics of Presentation Design eBook by VerdanaBold
Skskkxiixijsjsnwkwkaksixindndndjdjdjsjjssk
2. Competency Based Interviewing - September'16.pptx
Facade & Landscape Lighting Techniques and Trends.pptx.pdf

Demodulation bpsk up

  • 1. function DemBPSK(x,fc,fs,br,N,Time) Ts=1/fs; onebit=fs/br; %number of samples per bit (one sample is constituent of # bits) b=onebit; n=round((length(x)-1)/onebit); %the bits transmitted c=1; k=[]; for m=1:n; % iteration from 1 to number of bits(blocks) y=x(c:b); % take the part of the needed signal for one bit (eg. 1st block) q=sin(2*pi*((c:b)-1)*fc*Ts); %reference signal for Quadrature**Taking first part of cos x %figure; %plot(q); i=-sin(2*pi*((c:b)-1)*fc*Ts); % reference signal with -sin ->Inphase a=y.*q; % (received signal(1st block)) . (reference signal for Quadrature) ** cos(x)*m(t) d=y.*i; % (received signal(in phase, 1st block)) . (reference signal for Inphase) t= sum(a)-sum(d); % accumulative effect of first block if t>0; p=ones(1); %ones (binary) else p=zeros(1); %zeros end k=[k p]; %accumulate the value of output into k b=b+onebit; %update the value of b for the next input (next block) c=c+onebit; %update the value of c for the next input (2, next block) end figure; subplot(3,1,1); plot(x);grid on; title('BPSK Data at Receiver'); axis([0 length(x) -1 1]); subplot(3,1,2) %plot the output (bpsk signal) nn=0:n-1; plot(nn,k,'LineWidth',1); xlabel('N'); ylabel('Binary Data'); title('BPSK DeModulated Data'); axis([0 N+1 -0.5 1.5]); grid on; [r]=data_received(k,Ts); subplot(3,1,3) stem(nn,r); xlabel('Samples'); ylabel('Binary Data'); axis([0 N -0.5 1.5]); title('Received Signal'); receivedString=bin2str(r); disp(receivedString)