BER Calculation of BPSK for custom demodtalor IP core
1 次查看(过去 30 天)
显示 更早的评论
Hello All,
I am new to MATLAB. I have my own BPSK demodulator IP core. I have transmitter which transmit the data at 4.8ksps and modulate the signal through channel and noisy signal becomes the input to reciever. Receiver demodulates the signal and producing sequence of recovered bits. Up to this all process done through the instrument and the RF+FPGA board. I just want to comapre the received bits to be transmitted bits and tally up the errors using matlab. How could i do this?
Kindly guide me.
Thank you.
0 个评论
回答(2 个)
Awais Saeed
2021-9-13
编辑:Awais Saeed
2021-9-13
use biterr() and semilogy() to find bit errors and to plot BER curve
clc
clear
close all
% generate data to send
x = 4*rand(1,10000);
x(x<=3) = 0;
x(x>3) = 1;
% Add AWGN, compute BER for the received data
SNR=0:30;
for i=1:length(SNR)
y = awgn(x,i);
% Threshold detection
y(y<=0.5) = 0;
y(y>0.5) = 1;
% Compute bit error of received and transmitted data
[num(i),err(i)] = biterr(x,y);
end
% plot BER curve
semilogy(SNR,err,'r-')
ylabel('BER');
xlabel('SNR');
0 个评论
brahmi shah
2021-9-13
编辑:brahmi shah
2021-9-13
6 个评论
Awais Saeed
2021-9-13
[Input_file] = uigetfile('paste path to your file-containing folder','MultiSelect','on');
x = importdata(Input_file); % this is your transmitting data
% do your operations on x
% after performing operations, you will have recieved data as y
% Now compute error as
[num(i),err(i)] = biterr(x,y);
% if you are adding AWGN with different
% SNR values, then use biterr() in a loop
% as shown in my first answer
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 BPSK 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!