|
RENEWLab
1.1.0
RENEW project
|
|
| Number of CP samples to use in | FFT (on average) %% Define the preamble % LTS for fine CFO and channel estimation lts_f |
| |
| | sched_id (REF_ANT) |
| |
| | preamble (nid, start_index+1:start_index+N_SYM_SAMP) |
| |
| | preamble (REF_ANT, start_index+1:start_index+N_SYM_SAMP) |
| |
| initialize BS node_bs | sdrsync () |
| |
| synchronize delays only for BS node_bs | sdrrxsetup () |
| |
| configure the N_ZPAD_PRE | preamble (i, :) zeros(1 |
| |
| node_bs | sdrtx_single (tx_data, i) |
| |
| Burn data to the UE RAM end node_bs | sdr_activate_rx () |
| |
| end | payload_rx (ibs, :) |
| |
| | if (ibs==REF_ANT) rx_fft_ref(sid |
| |
| id | start_index: (id N_SC) |
| |
| else | rx_fft (sid, :) |
| |
| end node_bs | sdr_close () |
| |
| | figure (cf) |
| |
| | plot (-32:1:31, abs(cal_mat(i, :))) |
| |
| | axis ([-40 40 0 5]) grid on |
| |
| | title ('Calibration MAGNITUDE') |
| |
| | plot (-32:1:31, angle(cal_mat(i, :))) |
| |
| | title ('Calibration ANGLE') |
| |
|
| | Author (s)[version, executable, isloaded] = pyversion |
| |
| if ~isloaded pyversion usr bin python py print() %weird bug where py isn 't loaded in an external script end % Params Enable writing plots to PNG Iris | params |
| |
| | TX_FRQ = 2.5e9 |
| |
| | RX_FRQ = TX_FRQ |
| |
| | TX_GN = 70 |
| |
| | RX_GN = 50 |
| |
| | SMPL_RT = 5e6 |
| |
| | N_FRM = 1 |
| |
| | bs_ids = string.empty() |
| |
| | bs_sched = string.empty() |
| |
| Waveform params OFDM params | SC_IND_PILOTS = [8 22 44 58] |
| |
| Pilot subcarrier indices | SC_IND_DATA = [2:7 9:21 23:27 39:43 45:57 59:64] |
| |
| Data subcarrier indices | SC_IND_DATA_PILOT = [2:27 39:64]' |
| |
| | N_SC = 64 |
| |
| Number of subcarriers | CP_LEN = 16 |
| |
| Cyclic prefix length | N_SYM_SAMP = N_SC + CP_LEN |
| |
| Number of samples that will go over the air | N_ZPAD_PRE = 100 |
| |
| Number of OFDM symbols for | burst |
| |
| Number of OFDM symbols for it needs to be less than Rx processing params | FFT_OFFSET = 16 |
| |
| | lts_t = ifft(lts_f, 64) |
| |
| time domain Init Iris nodes Set up the Iris experiment Create BS Hub and UE objects | Note |
| |
| else | hub_id = [] |
| |
| All BS | schedule |
| |
| All BS Ref Schedule | N_BS_NODE = length(bs_ids) |
| |
| | REF_ANT = floor(N_BS_NODE/2) |
| |
| | sched_id = ones(1, N_BS_NODE) |
| |
| | lts = [lts_t(49:64) lts_t] |
| |
| | N_BS = N_BS_NODE - 1 |
| |
| | DATA_REP = floor(N_OFDM_SYM / N_BS) |
| |
| | data_len = N_BS * DATA_REP * N_SYM_SAMP |
| |
| | preamble = zeros(N_BS_NODE, data_len) |
| |
| for | jp |
| |
| for | rp |
| |
| end end | n_samp = N_ZPAD_PRE + data_len + N_ZPAD_POST |
| |
| | payload_rx = zeros(N_BS_NODE, data_len) |
| |
| | rx_fft = zeros(N_BS, N_SC) |
| |
| | rx_fft_ref = zeros(N_BS, N_SC) |
| |
| | cal_mat = zeros(N_BS, N_SC) |
| |
| Iris nodes parameters | bs_sdr_params |
| |
| | node_bs = iris_py(bs_sdr_params, hub_id) |
| |
| for | i |
| |
| configure the | BS |
| |
| configure the N_ZPAD_PRE | N_ZPAD_POST |
| |
| activate reading | stream [rx_vec_iris, data0_len] = node_bs.sdrrx(n_samp) |
| |
| read data process received reciprocity pilots | a = 1 |
| |
| | unos = ones(size(conj(lts))) |
| |
| for | ibs |
| |
| | v1 = filter(unos, a, abs(rx_vec_iris(ibs, end - DATA_REP * N_SYM_SAMP: end)) .^ 2) |
| |
| | lts_corr = (abs(v0) .^ 2) ./ v1 |
| |
| normalized correlation position of the last | peak [~, max_idx] = max(abs(lts_corr)) |
| |
| | rx_data_start |
| |
| | break |
| |
| for | sid |
| |
| | start_index = CP_LEN + ((rid - 1) + (sid - 1) * DATA_REP) * N_SYM_SAMP |
| |
| | __pad2__ |
| |
| | __pad3__ |
| |
| | cf = 0 |
| |
| | clf |
| |
◆ axis()
◆ FFT()
◆ figure()
◆ if()
◆ payload_rx()
◆ plot() [1/2]
◆ plot() [2/2]
| plot |
( |
-32:1:31 |
, |
|
|
angle(cal_mat(i, :)) |
|
|
) |
| |
◆ preamble() [1/3]
◆ preamble() [2/3]
◆ preamble() [3/3]
◆ rx_fft()
◆ sched_id()
◆ sdr_activate_rx()
◆ sdr_close()
◆ sdrrxsetup()
| synchronize delays only for BS node_bs sdrrxsetup |
( |
| ) |
|
◆ sdrsync()
◆ sdrtx_single()
◆ start_index:()
| id start_index: |
( |
id |
N_SC | ) |
|
|
staticvirtual |
◆ title() [1/2]
| title |
( |
'Calibration ANGLE' |
| ) |
|
◆ title() [2/2]
| title |
( |
'Calibration MAGNITUDE' |
| ) |
|
◆ __pad2__
◆ __pad3__
| read data process received reciprocity pilots a = 1 |
◆ Author
| Author(s)[version, executable, isloaded] = pyversion |
◆ break
◆ BS
◆ bs_ids
| else bs_ids = string.empty() |
◆ bs_sched
| All BS Ref Schedule bs_sched = string.empty() |
◆ bs_sdr_params
| Iris nodes parameters bs_sdr_params |
Initial value:= struct(...
'n_frame', 1, ...
)
◆ burst
◆ cal_mat
◆ cf
◆ clf
◆ CP_LEN
| Number of subcarriers CP_LEN = 16 |
◆ data_len
◆ DATA_REP
◆ FFT_OFFSET
| Number of OFDM symbols for it needs to be less than Rx processing params FFT_OFFSET = 16 |
◆ hub_id
| additional pilot as noise for i |
◆ ibs
Initial value:
% Correlation through filtering
◆ jp
◆ lts
◆ lts_corr
| lts_corr = (abs(v0) .^ 2) ./ v1 |
◆ lts_t
◆ N_BS
◆ N_BS_NODE
◆ N_FRM
◆ n_samp
◆ N_SC
◆ N_SYM_SAMP
◆ N_ZPAD_POST
◆ N_ZPAD_PRE
| Number of samples that will go over the air N_ZPAD_PRE = 100 |
◆ node_bs
◆ Note
| time domain Init Iris nodes Set up the Iris experiment Create BS Hub and UE objects Note |
◆ params
| if ~isloaded pyversion usr bin python py print () %weird bug where py isn't loaded in an external script end % Params Enable writing plots to PNG Iris params |
◆ payload_rx
◆ peak
◆ preamble
◆ REF_ANT
◆ rp
◆ rx_data_start
◆ rx_fft
◆ rx_fft_ref
◆ RX_FRQ
◆ RX_GN
◆ SC_IND_DATA
| Pilot subcarrier indices SC_IND_DATA = [2:7 9:21 23:27 39:43 45:57 59:64] |
◆ SC_IND_DATA_PILOT
| Data subcarrier indices SC_IND_DATA_PILOT = [2:27 39:64]' |
◆ SC_IND_PILOTS
◆ sched_id
◆ schedule
◆ sid
◆ SMPL_RT
◆ start_index
◆ stream
◆ TX_FRQ
◆ TX_GN
◆ unos
| unos = ones(size(conj(lts))) |
◆ v1
Interpolate Zero pad then filter(same as interp or upfirdn without signal processing toolbox) tx_vec_air
rx_data_start
Definition: rl_ofdm_calib.m:140
bs_sched
Definition: rl_ofdm_calib.m:34
DATA_REP
Definition: rl_ofdm_calib.m:83
RX_FRQ
Definition: rl_ofdm_calib.m:28
for jp
Definition: rl_ofdm_calib.m:86
n_zpad_samp
Definition: iris_py.m:35
bs_ids
Definition: rl_ofdm_calib.m:33
start_index
Definition: rl_ofdm_calib.m:150
for rp
Definition: rl_ofdm_calib.m:88
for ibs
Definition: rl_ofdm_calib.m:132
end end n_samp
Definition: rl_ofdm_calib.m:95
for sid
Definition: rl_ofdm_calib.m:147
preamble
Definition: rl_ofdm_calib.m:85
node_bs
Definition: rl_ofdm_calib.m:116
REF_ANT
Definition: rl_ofdm_calib.m:77
for nid
Definition: rl_ofdm_downlink_miso.m:158
position of the last peak max_idx
Definition: ofdm_mimo.m:228
v0
Definition: siso_ofdm_mf_sim.m:143
SMPL_RT
Definition: rl_ofdm_calib.m:31
data_len
Definition: rl_ofdm_calib.m:84
for i
Definition: rl_ofdm_calib.m:121
if TX_GN display('WARNING:MAXIMUM TX GAIN IS 81!')
end Rx payload processing Extract the payload samples(integral number of OFDM symbols following preamble) payload_vec
activate correlator end[rx_vec_pilot_all, data_len_all]
Definition: rl_ofdm_downlink_miso.m:286
sched_id
Definition: rl_ofdm_calib.m:78
TX_FRQ
Definition: rl_ofdm_calib.m:27
All BS Ref Schedule N_BS_NODE
Definition: rl_ofdm_calib.m:76
read data process received reciprocity pilots a
Definition: rl_ofdm_calib.m:130
TX_GN
Definition: rl_ofdm_calib.m:29
if(ibs==REF_ANT) rx_fft_ref(sid
N_BS
Definition: rl_ofdm_calib.m:82
rx_vec_iris
Definition: ofdm_mimo.m:139
Number of samples that will go over the air N_ZPAD_PRE
Definition: rl_ofdm_calib.m:45
RX_GN
Definition: rl_ofdm_calib.m:30
Cyclic prefix length N_SYM_SAMP
Definition: rl_ofdm_calib.m:44