Calculating SNR and BER

조회 수: 10 (최근 30일)
OSamah Alghammari
OSamah Alghammari 2018년 8월 6일
As I am newbie to signals, I have collected an appliance signal in frequency domain as follows:
(PSD- Power Spectral Density). So, I need to calculate the SNR (Signal to Noise Ratio) and BER (Bit Error Rate) caused by this signal in Powerline Calculation. So, I have made these codes in Matlab, but what I am stuck with is calculating the SNR and BER.
bits=10000; %number of bit
b=randi([0,1],1,bits); % generate random [0,1]
t=0:1/30:1-1/30; % Time period allocated for the signal
%ASK Carrier Signals
carrier_signa_l= sin(2*pi*t);
E1=sum(carrier_signa_l.^2);
carrier_signa_l=carrier_signa_l/sqrt(E1); %unit energy
carrier_signal_0 =0 * sin(2*pi*t); % zeros for 0 bits in the carrier signal
%MODULATION
ask=[];
for i=1:bits
if b(i)==1 % If bit = 1
ask=[ask carrier_signa_l];
else
ask=[ask carrier_signal_0];
end
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by