No BSD License  

Highlights from
Home Networking Basis

Home Networking Basis

by

 

11 Aug 2003 (Updated )

M-files for chapters 2-10 and Simulink models for Ethernet and Wireless Ethernet.

Radiomodel.m
for j=1:20
   ModelType='OBS';
%Separation distance Eexpressed in meet
Dn=5;
switch ModelType
   % For line-of-sight
	case 'LOS'
		% Probability of receiving a multipath
		for i=1:14
   			PTk(i)=1-i*7.8/367;
		end
		for i=15:25
   			PTk(i)=0.65-(i*7.8-110)/360;
		end
		for i=26:64
   			PTk(i)=0.22-(i*7.8-200)/1360;
      end
      % Delay related path loss exponent
      for i=1:2
   			nTk(i)=2.5+i*7.8/39;
		end
		for i=3:32
   			nTk(i)=3+(i*7.8-15.6)/380;
		end
		for i=33:64
   			nTk(i)=3.6;
      end
      % Mean
      mean1=10*nTk*log10(Dn/2.3);
      % Standard Deviation
		std1=4;
   case 'OBS'
		% Probability of receiving a multipath
		for i=1:12
   			PTk(i)=0.55+i*7.8/667;
		end
		for i=13:64
   			PTk(i)=0.08+0.62*exp(-(i*7.8-100)/75);
		end
      % Delay related path loss exponent
      for i=1:39
   			nTk(i)=3.65+i*7.8/536;
		end
		for i=40:64
   			nTk(i)=4.23;
		end
      % Mean
      mean1=10*nTk*log10(Dn/2.3);
      % Standard Deviation
      std1=5;
   otherwise
      
   end
OcTk=ceil(PTk-rand(1,64));
Ak1=zeros(1,64);
Ak0=rand(1,64)*std1+mean1;
for i=1:64
   if OcTk(i)==1
      Ak1(i)=Ak0(i);
   end
end
ak1=zeros(1,64);
for i=1:64
   if OcTk(i)==1
      ak1(i)=10^(-Ak1(i)/20);
   end
end
plot([1:64],ak1/max(ak1),'k')
aak1(j,:)=ak1;
end
mesh(aak1/max(aak1(:,1)))
view(30,30)
xlabel('Excess Delay (ns)')
ylabel('Channel Index')
zlabel('Relative Magnitude')

Contact us