www.pudn.com > smamt.zip > TSmart.m, change:2006-07-18,size:3618b

```%------------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
% This Program is Designed To Simulate Wiener Hopf Adaptive Temporal Reference Algorithm                                                   %
% It Is Applied on a Broadside Antenna Array of a Base Station Receiver ( Uplink ) Assuming Narrow Ban Desired Signal %
% Assumed Additive White Gaussian Noise Only                                                                                                                                           %
%------------------------------------------------------------------------------------------------------------------------------------------------------------------------------%
%General Antenna Array Specifications
A = input ('The Number of Array Elements : ') ;
B = input ('The Separation Distance Between Elements : ') ;
C = input ('The Operation Frequency : ') ;
%Input Desired Signal Specifications
E = input ('The Angle Of Un-Known Desired Signal : ') ;
D = input ('The Number Of Training Sequence Bits : ') ;
N = input ('The Number Of Snap Shots ( Samples ) Taken : ') ;
P = input ('The Signal To Noise Ratio Per Sample in dB : ') ;
E = ( E * pi ) / 180 ;
for J = 1 : D
H ( J ) = rem ( J , 2 ) ;
end
%Estimation of Spatial Covariance Matrix
X = zeros ( D , A ) ;
XX = zeros ( D , A ) ;
Y = zeros ( D, A ) ;
for K = 1 : N
for I = 1 : D
for J = 1 : A
Y ( I , J )  = ( H ( I ) * exp ( i*( 2 * pi * C * B * ( J - 1 ) * cos ( E ) ) / ( 3*10^8 ))) ;
X ( I , J ) = X ( I , J ) + Y ( I , J ) / N ;
end
XX = XX + awgn ( Y , P ) / N ;
end
end
R = cov ( XX ) ;
HH = abs ( XX ( : , 1 )) ;
HH ( D+1 ) = 0 ;
figure ( 1 ) , stairs( HH , 'linewidth' , 2 ) , title ('The Input Erroneous Digital Data') ,  xlabel ('The Bit Transition Period') , ylabel  ('The Input Digital Signal') , grid on ;
%Estimation of The Cross Correlation Vector
for J = 1 : A
S = 0 ;
SS = 0 ;
Z = 0 ;
for I = 1 : D
S = S + X ( I , J ) ;
SS = SS + XX ( I , J ) ;
Z = Z + SS * S' ;
end
Z ( J ) = Z / D ;
end
%Estimation of The Weight Vector Using Steepest Descent Method of Wiener Hopf Solution equation
TI = 1 ;
for CC = 1 : A
if TI == 1 W ( CC ) = 1 ;
else W ( CC ) = 0 ;
end
TI = 0 ;
end
M = ( 1 / max ( eig ( R ))) ;
for CC = 1 : 100
W = W +  M * ( Z.' - ( R * W.' )).' ;
W = -W ;
end
%Plot of The Output Radiation Pattern
T = 0 : 0.005*pi : pi ;
O = 0 ;
for I = 1 : A
L = exp ( i * ( 2 * pi * C * B * ( I-1 ) * cos ( T ))/( 3 * 10 ^8 ))  ;
O = O + ( L .* W ( I ) ) ;
end
O = abs ( O ) ;
O = 20 * log10 ( O / max ( O )) ;
T = ( T * 180 ) /pi ;
figure ( 2 ) , plot ( T , O , '-r' , 'linewidth' , 2 )  , title ('The Output Radiation Pattern For The Adaptive Temporal Reference Beam Former') ,  xlabel ('The Phase Angle  in Degrees') , ylabel  ('The Normalized Electric Field in dB') , axis ([ 0 180 -25 0 ]) , grid on ;
%Plot of The Output Valid Temporally Filtered Received Digital Data
Q = zeros ( D ) ;
for I = 1 : D
for J = 1 : A
Q ( I ) = Q ( I ) + XX ( I , J ) * W ( J ).' ;
end
end
OO = abs ( Q / max ( Q ) ) ;
OO ( D + 1 ) = 0 ;
figure ( 3 ) , stairs ( OO , 'linewidth' , 2 ) , title ('The Output Valid Digital Data') ,  xlabel ('The Bit Transition Period') , ylabel  ('The Output Digital Signal') , grid on ;```