Plotting AWGN in baseband binary transmission

How do I plot this?
S0(t)= sqrt(2*E/T) sin(pi*t/T)
S1(t)= sqrt(2*E/T) sin(2*pi*t/T)
where T is the period and E is normalized.
Can someone teach me how to plot this because I dont know how to plot E and T.

답변 (2개)

UJJWAL
UJJWAL 2011년 9월 30일

0 개 추천

Hi Phoon,
Your question is not clear. In the equation you have mentioned there is no mention of AWGN. It is not clear what you want to plot. The expression you have mentioned , it seems that it is of a signal of Symbol period 'T' for binary trnasmission. Multiplication by Sqrt[2*E/T) is done so as to ensure that the energy of the signal is 1. This is also a kind of normalization. For transmitting 1 and 0 usually the amplitudes are inverted. So Amplitude will be like Sqrt[2*E/T) for 1 and negetive of that for 0. So I dont know what you want to plot. I am below mentioning a plot for the BPSK transmission of a sequence of bits
x = [0,1,0,0,0,1,1,1]; % Bits to be transmitted
T= 1 ; % Symbol Period
len = length(0:0.001:1);
p=1;
for i = 1:length(x)
s(1,p:p+len-1) = (-1)^(1+x(i)) * sqrt(2*0.1/1) * sin(2*pi*(0:0.001:1)/T);
p=p+len;
end
t= 0:0.001:0.001*(p-2);
plot(t,s);
xlabel('Time\rightarrow','fontsize',18);
ylabel('s(t)\rightarrow','fontsize',18);
title('Baseband Signal','fontsize',20);
grid on;
For details clarify your question and reply back. Hope this helps
HAPPY TO HELP
UJJWAL
Phoon
Phoon 2011년 10월 1일

0 개 추천

Hi, this is my code.
I am supposed to make the lines into a sine wave, can you help me?
function MatFil1(name)
if(nargin==0)
name='PHOON JIAN'; % Generate name 'PHOON JIAN' AWGN bit sequence
end
name(name==' ')=[]; % Delete white space in the name string
name=upper(name);
nameAWGN=ones(1,length(name));
nameAWGN(name<='M')=0;
b0 = 3*ones(1,100) ; % Waveform for bit 0
b1 = 3*[ones(1, 50) -ones(1,50)] ; % Waveform for bit 1
input=[]; % Generate signal input for name 'PHOON JIAN'
for i=1:length(nameAWGN)
if nameAWGN(i)==0
input=[input b0];
else
input=[input b1];
end
end
h0 = 3*ones(1,100) ; % impulse response for match filter 0
h1 = 3*[-ones(1, 50) ones(1,50)] ; % impulse response for match filter 1
r0=conv(input,h0); % matched output for match filter 0
r1=conv(input,h1); % matched output for match filter 1
d=r1-r0; % detector output
figure;
maxnum=max([r0,r1]); minnum=min([r0,r1]);
subplot(3,1,1); plot(1:length(r0),r0);
xlabel('Time (Tb=100)'); title(['r0 output for ' name]);
hold on; % plot matched output r0
for i=100:100:length(r0)
if r0(i)==maxnum
plot([i,i],[minnum,maxnum],'r--'); % plot r0 markers
end
end
subplot(3,1,2); plot(1:length(r1),r1);
xlabel('Time (Tb=100)'); title(['r1 output for ' name]);
hold on; % plot matched output r1
for i=100:100:length(r1)
if r1(i)==maxnum
plot([i,i],[minnum,maxnum],'r--'); % plot r1 markers
end
end
subplot(3,1,3); plot(1:length(d),d); xlabel('Time (Tb=100)'); title(['detector output for ' name]);
hold on; % plot detector output
for i=100:100:length(d)
if d(i)==maxnum || d(i)==minnum
plot(i,d(i),'r*'); % plot detector marker
end
end
end

댓글 수: 1

You don't even have a pi in the above code, let alone a sin() or sqrt(), and you do not have any comments such as "I want to do S0 here!" such that we could get an idea of how you want S0 and S1 to relate to the rest of your program.
At present it does not appear that this program has anything to do with the question you asked ?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 PHY Components에 대해 자세히 알아보기

질문:

2011년 9월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by