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.

BPSK Demodulation code

Status
Not open for further replies.

Calvert

Newbie level 3
Newbie level 3
Joined
Apr 13, 2011
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,303
Please help me about BPSK demodulation code. I have face many problems at working time. If problems are incurred during working the speed of output is very slow.
physical therapy billing coding
 
Last edited:

Did you get anything Calvert? I am also looking for the same. :)
 

Hi. I have the same problem. I am trying to demodulate BPSK signal and here is my way: BPSK signal .* carrier => integral => compare with 0 (if >0 is 1 and <0 is -1)=> recover original signal.
Use can follow this link: **broken link removed** but if we use LPF, the BER is really high. My teacher said "use integral and then compare to 0". But now I have problem with integral signal because BPSK signal is not defined function (if you want to use integral function in matlab you should define function)
Any one help?
 

Here is all you need. It's part of my Project.
Hope this help
Code:
clc
clear all
close all

% Generation of bit pattern
s=round(rand(1,25));    % Generating 25 bits
signal=[];  
carrier=[];
t=[0:2*pi/119:2*pi];     % Creating 60 samples for one cosine 
for k=1:25
    if s(1,k)==0
        sig=-ones(1,120);    % 120 minus ones for bit 0
    else
        sig=ones(1,120);     % 120 ones for bit 1
    end
    c=cos(t);   
    carrier=[carrier c];
    signal=[signal sig];
end
figure(1)
subplot(6,1,1);
plot(signal);
axis([-100 3100 -1.5 1.5]);
title('\bf\it Original Bit Sequence');

subplot(6,1,2);
plot(carrier);
axis([-100 3100 -1.5 1.5]);
title('\bf\it Original Bit Sequence');

% BPSK Modulation of the signal
bpsk_sig=signal.*carrier;   % Modulating the signal
subplot(6,1,3);
plot(bpsk_sig);
axis([-100 3100 -1.5 1.5]);
title('\bf\it BPSK Modulated Signal');


%Demodulation
debpsk_sig=bpsk_sig.*carrier; %Coherent Multiplication
subplot (6,1,4);
plot(debpsk_sig);
axis([-100 3100 -2.5 2.5]);
title('\bf\it After Coherent Multiplication');

y=intdump(debpsk_sig,120); %Integral with period reset
subplot(6,1,5);
plot(y);
title('\bf\it After Intergrated with Period Reset');
orig_sig=[];
%Comparator with threshold 0
for i=1:25
    if y(i)<0
        r_sig=-ones(1,120);    % 120 minus ones for bit 0
    else
        r_sig=ones(1,120);     % 120 ones for bit 1
    end
    orig_sig=[orig_sig r_sig];
end
subplot(6,1,6);
plot(orig_sig);
axis([-100 3100 -1.5 1.5]);
title('\bf\it Original Signal');
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top