• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

9.4. MATLAB Files

9.4.1. CEBus PL Chirp

f=[0:359]/359*1.75e5+0.75e5;
%f=4e5;
t=[0:359]/359*1e-4;
chirp1=sin(2*pi*f.*t);
chirp=3.5*[chirp1(131:360) chirp1(1:130)];
figure(1)
plot(t,chirp)
xlabel('Time (Sec.)')
ylabel('Magnitude')
F=fft(chirp);
figure(2)
py=10*log10((abs(F(1:100))).^2/360/10/0.001/3.6e6*2);
plot([1:100]/360*3.6e6, py)
grid
xlabel('Frequency (Hz)')
ylabel('PSD (dBm/Hz)')

9.4.2. GF Representation Calculation

%Primitive Polynomial
%pp=[1 0 1 1];
%pp=[1 0 0 1 1];
%pp=[1 0 0 1 0 1];
%pp=[1 0 0 0 0 1 1];
%pp=[1 0 0 0 1 0 0 1];
pp=[1 0 0 0 1 1 1 0 1];
m=length(pp)-1;
bpr=zeros(2^m,m+1);
%Binary presentation
%Up to mth power
for i=2:m+1
    bpr(i,m+3-i)=1;
end
%Larger than mth power
for i=m+2:2^m
    for j=1:m
        bpr(i,j)=bpr(i-1,j+1);
    end
    bpr(i,m+1)=0;
    if bpr(i,1)==1
        bpr(i,:)=xor(bpr(i,:),pp);
    end
end
%Binary to decimal
b2d=zeros(2^m,1);
for i=1:2^m
    for j=1:m
    b2d(i)=b2d(i)+bpr(i,j+1)*2^(m-j);
    end
end
%Log table
[xx,ppr]=sort(b2d(2:2^m));
ppr=ppr-1;
%Inverse log table
dpr=b2d(3:2^m);


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint