|
RENEWLab
1.1.0
RENEW project
|
Functions | |
| Scale for Tx | waveform ([0:1]) else nt |
| Theoretical BER | fprintf ("Channel type: %s \n", chan_type) |
| Modulation | order (2/4/16/64=BSPK/QPSK/16-QAM/64-QAM) % OFDM params SC_IND_PILOTS |
| Number of data | symbols (one per data-bearing subcarrier per OFDM symbol) N_LTS_SYM |
| id | FFT_OFFSET () |
| Number of CP samples to use in | FFT (on average) LTS_CORR_THRESH=0.6 |
| other subcarriers will remain at | ifft_in_mat (SC_IND_DATA, :) |
| ifft_in_mat (SC_IND_PILOTS, :) | |
| Insert the cyclic prefix | if (CP_LEN > 0) tx_cp |
| 1, N_ZPAD_POST | zeros () |
| abs(tx_vec_iris | max () |
| if (N_BS_NODE > 1) b_scheds | |
| sdr_params (2) | |
Variables | |
| 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 | CHANNEL = 11 |
| Channel to tune Tx and Rx radios | SIM_MOD = 1 |
| if SIM_MOD | chan_type = "awgn" |
| nt = 100 | |
| sim_SNR_db = 1:20 | |
| nsnr = length(sim_SNR_db) | |
| snr_plot = 20 | |
| TX_SCALE = 1 | |
| end | ber_SIM = zeros(nt,nsnr) |
| BER | berr_th = zeros(nsnr,1) |
| Iris | params |
| N_UE = 1 | |
| TX_FRQ = 2.5e9 | |
| RX_FRQ = TX_FRQ | |
| TX_GN = 40 | |
| RX_GN = 20 | |
| SMPL_RT = 5e6 | |
| N_FRM = 10 | |
| b_ids = string.empty() | |
| b_scheds = string.empty() | |
| ue_ids = string.empty() | |
| ue_scheds = string.empty() | |
| Waveform params | N_OFDM_SYM = 46 |
| Number of OFDM symbols for | burst |
| Number of OFDM symbols for it needs to be less than | MOD_ORDER = 16 |
| 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_DATA_SYMS = N_OFDM_SYM * length(SC_IND_DATA) |
| Number of | N_SYM_SAMP = N_SC + CP_LEN |
| Number of samples that will go over the air | N_ZPAD_PRE = 90 |
| Normalized threshold for LTS correlation | DO_APPLY_PHASE_ERR_CORRECTION = 1 |
| Enable Residual CFO estimation correction Define the preamble LTS for fine CFO and channel estimation | lts_f |
| lts_t = ifft(lts_f, 64) | |
| time domain | preamble = [lts_t(33:64) lts_t lts_t] |
| Generate a payload of random integers | tx_data = randi(MOD_ORDER, 1, N_DATA_SYMS) - 1 |
| tx_syms = mod_sym(tx_data, MOD_ORDER) | |
| Reshape the symbol vector to a matrix with one column per OFDM symbol | tx_syms_mat = reshape(tx_syms, length(SC_IND_DATA), N_OFDM_SYM) |
| Define the pilot tone values as BPSK symbols | pilots = [1 1 -1 1].' |
| Repeat the pilots across all OFDM symbols | pilots_mat = repmat(pilots, 1, N_OFDM_SYM) |
| IFFT Construct the IFFT input matrix | ifft_in_mat = zeros(N_SC, N_OFDM_SYM) |
| Insert the data and pilot | values |
| Perform the IFFT | tx_payload_mat = ifft(ifft_in_mat, N_SC, 1) |
| end Reshape to a vector | tx_payload_vec = reshape(tx_payload_mat, 1, numel(tx_payload_mat)) |
| tx_vec = [preamble tx_payload_vec] | |
| Leftover from zero | padding |
| for | isnr |
| rx_vec_iris = rx_vec_iris.' | |
| just to agree with what the hardware spits out else Init Iris nodes Set up the Iris experiment Create a two Iris node | objects |
| just to agree with what the hardware spits out else Init Iris nodes Set up the Iris experiment Create a two Iris node | RF3E000024 |
| b_prim_sched = "PGGGGGRG" | |
| BS primary noede s | schedule |
| ue_sched = "GGGGGGPG" | |
| for | iu |
| end | n_samp = length(tx_vec_iris) |
| Iris nodes parameters | sdr_params |
| l_rx_dec =length(rx_vec_iris) | |
| Correlate for LTS | a = 1 |
|
virtual |
| Theoretical BER fprintf | ( | "Channel type: %s \n" | , |
| chan_type | |||
| ) |
| if | ( | N_BS_NODE | , |
| 1 | |||
| ) |
| other subcarriers will remain at ifft_in_mat | ( | SC_IND_DATA | , |
| : | |||
| ) |
| ifft_in_mat | ( | SC_IND_PILOTS | , |
| : | |||
| ) |
|
staticvirtual |
| Modulation order | ( | 2/4/16/ | 64 = BSPK/QPSK/16-QAM/64-QAM | ) |
| sdr_params | ( | 2 | ) |
| Scale for Tx waveform | ( | ) |
|
virtual |
| Correlate for LTS a = 1 |
| Author(s)[version, executable, isloaded] = pyversion |
| b_ids = string.empty() |
| b_prim_sched = "PGGGGGRG" |
| Number of OFDM symbols for burst |
| 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 CHANNEL = 11 |
| Number of subcarriers CP_LEN = 16 |
| Normalized threshold for LTS correlation DO_APPLY_PHASE_ERR_CORRECTION = 1 |
| IFFT Construct the IFFT input matrix ifft_in_mat = zeros(N_SC, N_OFDM_SYM) |
| l_rx_dec =length(rx_vec_iris) |
| Enable Residual CFO estimation correction Define the preamble LTS for fine CFO and channel estimation lts_f |
| lts_t = ifft(lts_f, 64) |
| Number of OFDM symbols for it needs to be less than MOD_ORDER = 16 |
| Cyclic prefix length N_DATA_SYMS = N_OFDM_SYM * length(SC_IND_DATA) |
| N_FRM = 10 |
| Waveform params N_OFDM_SYM = 46 |
| end n_samp = length(tx_vec_iris) |
| N_SC = 64 |
| N_UE = 1 |
| Number of samples that will go over the air N_ZPAD_PRE = 90 |
| nsnr = length(sim_SNR_db) |
| nt = 100 |
| just to agree with what the hardware spits out else Init Iris nodes Set up the Iris experiment Create a two Iris node objects |
| Leftover from zero padding |
| Iris params |
| just to agree with what the hardware spits out else Init Iris nodes Set up the Iris experiment Create a two Iris node RF3E000024 |
| RX_FRQ = TX_FRQ |
| RX_GN = 20 |
| end rx_vec_iris = rx_vec_iris.' |
| 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]' |
| BS primary noede s schedule |
| Iris nodes parameters sdr_params |
| Channel to tune Tx and Rx radios SIM_MOD = 1 |
| sim_SNR_db = 1:20 |
| SMPL_RT = 5e6 |
| snr_plot = 20 |
| Generate a payload of random integers tx_data = randi(MOD_ORDER, 1, N_DATA_SYMS) - 1 |
| TX_FRQ = 2.5e9 |
| TX_GN = 40 |
| tx_payload_mat = ifft(ifft_in_mat, N_SC, 1) |
| id tx_payload_vec = reshape(tx_payload_mat, 1, numel(tx_payload_mat)) |
| TX_SCALE = 1 |
| Reshape the symbol vector to a matrix with one column per OFDM symbol tx_syms_mat = reshape(tx_syms, length(SC_IND_DATA), N_OFDM_SYM) |
| tx_vec = [preamble tx_payload_vec] |
| ue_ids = string.empty() |
| ue_sched = "GGGGGGPG" |
| end ue_scheds = string.empty() |
| Insert the data and pilot values |