Agora
1.2.0
Agora project
|
Functions | |
function | inspect_single_ul_frame (dataset_filename, inspect_frame, verbose) %%Load data from the input file and inspect evm and snr %dataset_filename |
id | Data () |
figure ('Name', ['Ant ' num2str(u) ', Frame ' num2str(inspect_frame) ' Receive WaveForm']) | |
tiledlayout (2, 1) %Top(Real) nexttile | |
plot (real(combined_rx)) | |
axis ([0 inf -1 1]) | |
title ('Rx Real(I)') | |
Bottom (Q) nexttile | |
plot (imag(combined_rx)) | |
Variables | |
inspect_frame = 5 | |
verbose = "true" | |
end | samples_per_slot = double(h5readatt(dataset_filename, group_id, 'SLOT_SAMP_LEN')) |
tx_zero_prefix_len = double(h5readatt(dataset_filename, group_id, 'TX_ZERO_PREFIX_LEN')) | |
data_size = double(h5readatt(dataset_filename, group_id, 'OFDM_DATA_NUM')) | |
data_start = double(h5readatt(dataset_filename, group_id, 'OFDM_DATA_START')) | |
data_stop = double(h5readatt(dataset_filename, group_id, 'OFDM_DATA_STOP')) | |
fft_size = double(h5readatt(dataset_filename, group_id, 'OFDM_CA_NUM')) | |
cp_len = double(h5readatt(dataset_filename, group_id, 'CP_LEN')) | |
total_ul_symbols = double(h5readatt(dataset_filename, group_id, 'UL_SLOTS')) | |
ul_pilot_symbols = double(h5readatt(dataset_filename, group_id, 'UL_PILOT_SLOTS')) | |
total_users = double(h5readatt(dataset_filename, group_id, 'CL_NUM')) | |
bs_antennas = double(h5readatt(dataset_filename, group_id, 'ANT_NUM')) | |
pilot_symbols = double(h5readatt(dataset_filename, group_id, 'PILOT_SLOTS')) | |
Choose the downlink data | dataset_id = '/UplinkData' |
end Dimensions[Samples, Ant, Symbol, Cells, Frame] | start = [1 1 1 1 inspect_frame] |
count = [(samples_per_slot * 2) bs_antennas total_ul_symbols 1 1] | |
Generate a int16 array | rx_syms_hdf5 = h5read(dataset_filename, strcat(group_id, dataset_id), start, count) |
Convert to double and scale | rx_syms_scaled_double = double(rx_syms_hdf5) ./ double(intmax('int16')) |
Convert to complex double Samples x User x Symbol | rx_syms_cxdouble = complex(rx_syms_scaled_double(1:2:end, :, :), rx_syms_scaled_double(2:2:end, :, :)) |
Split off pilots and data | rx_pilot_cxdouble = rx_syms_cxdouble(:,:,1:ul_pilot_symbols) |
rx_data_cxdouble = rx_syms_cxdouble(:,:,1+ul_pilot_symbols:end) | |
end Generate a int16 array | rx_pilot_hdf5 = h5read(dataset_filename, strcat(group_id,dataset_id), start, count) |
Convert to double and scale | rx_pilot_scaled_double = double(rx_pilot_hdf5) ./ double(intmax('int16')) |
Plot Rx waveform for | u |
axis | ( | ) |
Bottom | ( | Q | ) |
|
virtual |
figure | ( | 'Name' | ) |
function inspect_single_ul_frame | ( | dataset_filename | , |
inspect_frame | , | ||
verbose | |||
) |
plot | ( | imag(combined_rx) | ) |
plot | ( | real(combined_rx) | ) |
tiledlayout | ( | 2 | , |
1 | |||
) |
title | ( | 'Rx Real(I)' | ) |
bs_antennas = double(h5readatt(dataset_filename, group_id, 'ANT_NUM')) |
clear start count = [(samples_per_slot * 2) bs_antennas total_ul_symbols 1 1] |
data_size = double(h5readatt(dataset_filename, group_id, 'OFDM_DATA_NUM')) |
data_start = double(h5readatt(dataset_filename, group_id, 'OFDM_DATA_START')) |
data_stop = double(h5readatt(dataset_filename, group_id, 'OFDM_DATA_STOP')) |
Choose the pilot data dataset_id = '/UplinkData' |
fft_size = double(h5readatt(dataset_filename, group_id, 'OFDM_CA_NUM')) |
inspect_frame = 5 |
pilot_symbols = double(h5readatt(dataset_filename, group_id, 'PILOT_SLOTS')) |
rx_data_cxdouble = rx_syms_cxdouble(:,:,1+ul_pilot_symbols:end) |
Convert to complex double Samples x User x Symbol rx_pilot_cxdouble = rx_syms_cxdouble(:,:,1:ul_pilot_symbols) |
clear rx_pilot_hdf5 = h5read(dataset_filename, strcat(group_id,dataset_id), start, count) |
clear rx_pilot_scaled_double = double(rx_pilot_hdf5) ./ double(intmax('int16')) |
Convert to complex double Samples x User x Symbol rx_syms_cxdouble = complex(rx_syms_scaled_double(1:2:end, :, :), rx_syms_scaled_double(2:2:end, :, :)) |
clear rx_syms_hdf5 = h5read(dataset_filename, strcat(group_id, dataset_id), start, count) |
clear rx_syms_scaled_double = double(rx_syms_hdf5) ./ double(intmax('int16')) |
end samples_per_slot = double(h5readatt(dataset_filename, group_id, 'SLOT_SAMP_LEN')) |
Dimensions [Samples, Ant, Symbol, Cells, Frame] start = [1 1 1 1 inspect_frame] |
total_ul_symbols = double(h5readatt(dataset_filename, group_id, 'UL_SLOTS')) |
total_users = double(h5readatt(dataset_filename, group_id, 'CL_NUM')) |
tx_zero_prefix_len = double(h5readatt(dataset_filename, group_id, 'TX_ZERO_PREFIX_LEN')) |
end clear u |
ul_pilot_symbols = double(h5readatt(dataset_filename, group_id, 'UL_PILOT_SLOTS')) |
Display Info if verbose = "true" |