o-du/phy
Intel O-RAN/X-RAN Generated Doxygen Documentation
Functions | Variables
gen_test.m File Reference

Go to the source code of this file.

Functions

< COPYRIGHT_TAG > This script was tested with GNU version or Matlab (R2017a) close all
 
 switch (bw) case
 
otherwise disp ('Unknown BW &&mu') end end else disp('mmWave') if(mu >
 
 for (i=1:1:nSlots *14-1) ifft_in_1
 
 disp (file_name) fileID
 
 fwrite (fileID, antX_16, 'int16')
 
 fclose (fileID)
 
end if bfw_gen disp ('Generate BF Weights per RB') %seed to make it repeatable rand('seed'
 
 imag ((W_dl(:, ant).')) *iPrb]]
 
reuse channel for all symbols for (slot_idx=1:1:nSlots *14) bfw_all_slots = [bfw_all_slots, bfw_per_sym]
 
 imag ((W_ul(:, ant).')) *iPrb]]
 

Variables

< COPYRIGHT_TAG > This script was tested with GNU Octave
 
clear all
 
MHz MHz MHz MHz MHz MHz MHz MHz MHz nNumRbsPerSymF1
 
 nNumRbsPerSymF2
 
total number of tests tests_total
 
usecase mu0_10mhz
 
usecase mu0_20mhz
 
usecase mu1_100mhz
 
usecase mu3_100mhz
 
 path_to_usecase_all
 
or bw =bw_all(test_num) %5
 
or MHz ant_num
 
 numRBs = nNumRbsPerSymF1(nNumerology,0+1)
 
 case
 
 ant_c = ifft_in
 
 ifft_in_1
 
end write files for IQ samples for ant
 
 antX_16 =int16(antX.')
 
 file_name = strcat(path_to_usecase,"ant_", num2str(ant-1),".bin")
 
end if bfw_gen random channel matrix for single sym on syngle RB H = (rand(trx,ant_num) + 1j*rand(trx,ant_num))
 
calculate weights W_dl
 
weights for DL W_ul = ((ctranspose(H)*H)^-1)*ctranspose(H)
 
adjust channel per each RB for iPrb
 
end bfw_all_slots = []
 
end bfw_all_slots_int = int16(bfw_all_slots./max(max(abs((bfw_all_slots.')))).*2^15)
 
UL bfw_per_sym = []
 

Function Documentation

◆ disp() [1/3]

otherwise disp ( 'Unknown BW &&mu'  )
Initial value:
==0
disp('Incorrect Numerology and BW combination.')
return
end
nSlots
%use file as input
%ifft_in = load('ifft_in.txt')
%gen IQs
ifft_in = [[1:1:(numRBs*12)]', [1:1:(numRBs*12)]']
or bw
Definition: gen_test.m:81
otherwise disp('Unknown BW &&mu') end end else disp('mmWave') if(mu >
numRBs
Definition: gen_test.m:96

◆ disp() [2/3]

disp ( file_name  )

◆ disp() [3/3]

end if bfw_gen disp ( 'Generate BF Weights per RB'  )

◆ fclose()

fclose ( fileID  )
Here is the caller graph for this function:

◆ for() [1/2]

for ( = 1:1:nSlots *14-1)

◆ for() [2/2]

reuse channel for all symbols for ( slot_idx  = 1:1:nSlots *14) = [bfw_all_slots, bfw_per_sym]

◆ fwrite()

fwrite ( fileID  ,
antX_16  ,
'int16'   
)
Here is the caller graph for this function:

◆ imag() [1/2]

imag ( (W_dl(:, ant).')  )

◆ imag() [2/2]

imag ( (W_ul(:, ant).')  )

◆ Matlab()

<COPYRIGHT_TAG> This script was tested with GNU version or Matlab ( R2017a  )

◆ switch()

switch ( bw  )

Definition at line 94 of file gen_test.m.

Here is the caller graph for this function:

Variable Documentation

◆ all

clear all

Definition at line 10 of file gen_test.m.

◆ ant

for ant
Initial value:
= 1:1:ant_num
antX=ant_c*(ant*10)
end write files for IQ samples for ant
Definition: gen_test.m:166
ant_c
Definition: gen_test.m:159
or MHz ant_num
Definition: gen_test.m:82

Definition at line 166 of file gen_test.m.

◆ ant_c

ant_c = ifft_in

Definition at line 159 of file gen_test.m.

◆ ant_num

or MHz ant_num
Initial value:
= ant_num_all(test_num)
bfw_gen=bfw_gen_all(test_num)
trx = trx_all(test_num)
path_to_usecase = path_to_usecase_all(test_num)
nSlots=nSlots_all(test_num) % any 40 and 160
if sub6
disp('Sub6')
if mu < 3
nNumerology = mu+1
otherwise disp('Unknown BW &&mu') end end else disp('mmWave') if(mu >
path_to_usecase_all
Definition: gen_test.m:69

Definition at line 82 of file gen_test.m.

◆ antX_16

write files for IQ samples antX_16 =int16(antX.')

Definition at line 168 of file gen_test.m.

◆ bfw_all_slots

end bfw_all_slots = []

Definition at line 205 of file gen_test.m.

◆ bfw_all_slots_int

end bfw_all_slots_int = int16(bfw_all_slots./max(max(abs((bfw_all_slots.')))).*2^15)

Definition at line 211 of file gen_test.m.

◆ bfw_per_sym

UL bfw_per_sym = []

Definition at line 222 of file gen_test.m.

◆ bw

or bw =bw_all(test_num) %5

Definition at line 81 of file gen_test.m.

◆ case

switch(bw case
Initial value:
{10}
numRBs = nNumRbsPerSymF1(nNumerology,1+1)
MHz MHz MHz MHz MHz MHz MHz MHz MHz nNumRbsPerSymF1
Definition: gen_test.m:13
numRBs
Definition: gen_test.m:96

Definition at line 97 of file gen_test.m.

◆ file_name

file_name = strcat(path_to_usecase,"ant_", num2str(ant-1),".bin")

Definition at line 169 of file gen_test.m.

◆ H

end if bfw_gen random channel matrix for single sym on syngle RB H = (rand(trx,ant_num) + 1j*rand(trx,ant_num))

Definition at line 183 of file gen_test.m.

◆ ifft_in_1

ifft_in_1

Definition at line 162 of file gen_test.m.

◆ iPrb

adjust channel per each RB for iPrb
Initial value:
= 1:1:numRBs
numRBs
Definition: gen_test.m:96
UL bfw_per_sym
Definition: gen_test.m:222

Definition at line 201 of file gen_test.m.

◆ mu0_10mhz

usecase mu0_10mhz

Definition at line 62 of file gen_test.m.

◆ mu0_20mhz

usecase mu0_20mhz

Definition at line 63 of file gen_test.m.

◆ mu1_100mhz

usecase cat_b mu1_100mhz

Definition at line 64 of file gen_test.m.

◆ mu3_100mhz

usecase mu3_100mhz

Definition at line 65 of file gen_test.m.

◆ nNumRbsPerSymF1

MHz MHz MHz MHz MHz MHz MHz MHz MHz nNumRbsPerSymF1
Initial value:
= ...
[
% 5MHz 10MHz 15MHz 20 MHz 25 MHz 30 MHz 40 MHz 50MHz 60 MHz 70 MHz 80 MHz 90 MHz 100 MHz
[25, 52, 79, 106, 133, 160, 216, 270, 0, 0, 0, 0, 0]

Definition at line 13 of file gen_test.m.

◆ nNumRbsPerSymF2

nNumRbsPerSymF2
Initial value:
= ...
[
% 50Mhz 100MHz 200MHz 400MHz
[66, 132, 264, 0] % Numerology 2 (60KHz)
[32, 66, 132, 264] % Numerology 3 (120KHz)
]

Definition at line 21 of file gen_test.m.

◆ numRBs

numRBs = nNumRbsPerSymF1(nNumerology,0+1)

Definition at line 96 of file gen_test.m.

◆ Octave

<COPYRIGHT_TAG> This script was tested with GNU Octave

Definition at line 7 of file gen_test.m.

◆ path_to_usecase_all

path_to_usecase_all
Initial value:
nSlots_all = ...
[
40,40,40,40,40,10
]
%select mu and bw to generate test files
for test_num =(1:1:tests_total)
test_num
sub6=sub6_all(test_num) %false
mu=mu_all(test_num) % 0
or bw
Definition: gen_test.m:81
total number of tests tests_total
Definition: gen_test.m:29
path_to_usecase_all
Definition: gen_test.m:69

Definition at line 69 of file gen_test.m.

◆ tests_total

total number of tests tests_total

Definition at line 29 of file gen_test.m.

◆ W_dl

calculate weights W_dl
Initial value:
= H^*(H^TH^*)^-1
% W_ul = ((H^H*H)^-1)H^H
% where H^* - conjugate
% H^T - transpose
% H^H - conjugate transpose
W_dl = conj(H)*(transpose(H)*conj(H))^-1
end if bfw_gen random channel matrix for single sym on syngle RB H
Definition: gen_test.m:183
calculate weights W_dl
Definition: gen_test.m:186
weights for DL W_ul
Definition: gen_test.m:192

Definition at line 186 of file gen_test.m.

◆ W_ul

weights for UL W_ul = ((ctranspose(H)*H)^-1)*ctranspose(H)

Definition at line 192 of file gen_test.m.