'Array' 'Subarrayselection' 'Subarraysteering' 'Custom' 'Array' 'Subarrayselection' 'Subarraysteering' 'Custom'

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Nt = 64;  

>> Nt is the number of elements in the transmitting array.


NtRF = 4 >> NtRF is the number of elements in the receiving array.

rng(4096);
>>The rng command controls the seed, or starting point, for this value
>>>  A random seed is a starting point in generating random numbers

c = 3e8; >> Propagation speed

fc = 28e9; >> Carrier frequency (28GHz)

lambda = c/fc; >>Wavelength for fc = 28e9

txarray = phased.PartitionedArray(...
'Array',phased.URA([sqrt(Nt) sqrt(Nt)],lambda/2),...
'SubarraySelection',ones(NtRF,Nt),'SubarraySteering','Custom');
rxarray = phased.PartitionedArray(...
'Array',phased.URA([sqrt(Nr) sqrt(Nr)],lambda/2),...
'SubarraySelection',ones(NrRF,Nr),'SubarraySteering','Custom');

>>The above array can be modeled by partitioning the array aperture into 4 completely connected
subarrays.

Ncl = 6; >> Consider that 6 scattering clusters randomly distributed in space

Nray = 8; >>Within each cluster, there are 8 closely located scatterers.

Nscatter = Nray*Ncl;

angspread = 5; >>angle spread of 5 degrees

% compute randomly placed scatterer clusters


>>> Clustering methods are used to identify groups of similar objects in a multivariate data sets
collected from fields

txclang = [rand(1,Ncl)*120-60;rand(1,Ncl)*60-30];
rxclang = [rand(1,Ncl)*120-60;rand(1,Ncl)*60-30];
txang = zeros(2,Nscatter);
rxang = zeros(2,Nscatter);
>>>compute the rays within each cluster
for m = 1:Ncl
txang(:,(m-1)*Nray+(1:Nray)) =
randn(2,Nray)*sqrt(angspread)+txclang(:,m);

rxang(:,(m-1)*Nray+(1:Nray)) =
randn(2,Nray)*sqrt(angspread)+rxclang(:,m);

>>>Using complex circular symmetric Gaussian distribution.

F = diagbfweights(H); >>Diagonalizing the channel matrix.

F = F(1:NtRF,:); >>Extracting the first NtRF dominating modes.

pattern(txarray,fc,-90:90,-90:90,'Type','efield',...
'ElementWeights',F','PropagationSpeed',c);

>> Explaining the transmit beam pattern.

snr_param = -40:5:0; >> SNR parameters

Nsnr = numel(snr_param); >> Number of Array Element

Ns_param = [1 2]; >> nS_param should have the same number of rows as the number of
Zero element with coefficient

Ropt = zeros(Nsnr,NNs);

>>The roots function calculates the roots of a single-variable polynomial represented


by a vector of coefficients.
Niter = 50;

for m = 1:Nsnr
snr = db2pow(snr_param(m));
for n = 1:Niter
>> Channel realization
txang = [rand(1,Nscatter)*60-30;rand(1,Nscatter)*20-10];
rxang = [rand(1,Nscatter)*180-90;rand(1,Nscatter)*90-45];
At = steervec(txpos,txang);
Ar = steervec(rxpos,rxang);
g = (randn(1,Nscatter)+1i*randn(1,Nscatter))/sqrt(Nscatter);
H = scatteringchanmtx(txpos,rxpos,txang,rxang,g);

for k = 1:NNs
Ns = Ns_param(k);
>> Compute optimal weights and its spectral
efficiency

[Fopt,Wopt] = helperOptimalHybridWeights(H,Ns,1/snr);
Ropt(m,k) = Ropt(m,k)
+helperComputeSpectralEfficiency(H,Fopt,Wopt,Ns,snr);

>>Compute hybrid weights and its spectral efficiency

plot(snr_param,Ropt(:,1),'--sr',...

>> Ploting the Parameter

snr_param,Ropt(:,2),'--b',...

>> The roots function calculates the roots of a single-variable polynomial represented by a


vector of coefficients

xlabel('SNR (dB)');

>> Defining SNR on X-axis

ylabel('Spectral Efficiency (bits/s/Hz');

>> Defining spectral efficiency on y-axis

You might also like