Agora  1.2.0
Agora project
inspect_agora_results.m File Reference

Functions

function inspect_agora_results (dataset_filename, verbose) %%Load data from the input file and inspect evm and snr %dataset_filename
 
id Data ()
 
end New (Beacon RSSI) figure('Name'
 
 set (gca, 'FontSize', 18)
 
 plot (rx_beacon_rssi.', 'LineWidth', 2) axis([0 total_frames -50 0])
 
 ylabel ('Beacon RSSI(dB)') xlabel('Frame') title(['Rx Beacon Power in ' experiment ' Experiment']) legend(cl_sdr_id) if total_dl_symbols
 
*for complex type (native float) total_samples
 
 Samples (complex) x User Ant x Downlink Data Symbol Id tx_data_cxdouble
 
Plot SNR &EVM Results figure ('Name', ['File ' dataset_filename])
 
 tiledlayout (3, 1) % Top(SNR) nexttile
 
 plot (rf_snr.', 'LineWidth', 2)
 
 ylabel ('Pilot SNR(dB)') title([experiment ' Beamforming SNR &EVM plots']) legend(cl_sdr_id) nexttile
 
 plot (snr.', 'LineWidth', 2)
 
 ylabel ('EVM SNR(dB)') %Bottom(EVM) nexttile
 
 plot (evm.', 'LineWidth', 2)
 
 axis ([0 total_frames 0(4 *max(mean(evm, 2)))])
 
 ylabel ('EVM(%)') clear rx_beacon_cxdouble rx_syms_cxdouble tx_syms_cxdouble total_users
 

Variables

 inspect_frame = 100
 
 verbose = "false"
 
end total_frames = double(h5readatt(dataset_filename, group_id, 'MAX_FRAME'))
 
 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_dl_symbols = double(h5readatt(dataset_filename, group_id, 'DL_SLOTS'))
 
 dl_pilot_symbols = double(h5readatt(dataset_filename, group_id, 'DL_PILOT_SLOTS'))
 
 cl_sdr_id = h5readatt(dataset_filename, group_id, 'CL_SDR_ID')
 
Choose the Beacon data dataset_id = '/BeaconData'
 
end Generate a int16 array rx_beacon_hdf5 = h5read(dataset_filename, strcat(group_id,dataset_id))
 
Dimensions[Samples, Ant, Symbol, Cells, Frame] total_users = size(rx_beacon_hdf5, 2)
 
Convert to double and scale rx_beacon_scaled_double = double(rx_beacon_hdf5) ./ double(intmax('int16'))
 
Convert to complex double Samples x User x Symbol rx_beacon_cxdouble = complex(rx_beacon_scaled_double(1:2:end, :, :, 1:total_frames), rx_beacon_scaled_double(2:2:end,:, :, 1:total_frames))
 
 rx_beacon_rssi = process_beacon(rx_beacon_cxdouble, tx_zero_prefix_len)
 
 experiment = 'MU-MIMO'
 
end Beacon
 
end Generate a int16 array rx_syms_hdf5 = h5read(dataset_filename, strcat(group_id,dataset_id))
 
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 x Frame rx_syms_cxdouble = complex(rx_syms_scaled_double(1:2:end, :, :, 1:total_frames), rx_syms_scaled_double(2:2:end,:, :, 1:total_frames))
 
Split off pilots and data rx_pilot_cxdouble = rx_syms_cxdouble(:,:,1:dl_pilot_symbols, :)
 
 rx_data_cxdouble = rx_syms_cxdouble(:,:,1+dl_pilot_symbols:end, :)
 
 configs
 
end start = [1 1 1 1 1]
 
 count = [total_samples total_users dl_pilot_symbols 1 1]
 
 tx_pilot_hdf5 = double(h5read(dataset_filename, strcat(group_id,dataset_id), start, count))
 
Convert to complex tx_pilot_cxdouble = complex(tx_pilot_hdf5(1:2:end,:,:), tx_pilot_hdf5(2:2:end,:,:))
 
 tx_data_hdf5 = double(h5read(dataset_filename, strcat(group_id,dataset_id), start, count))
 
Convert to complex type tx_syms_cxdouble = complex(tx_data_hdf5(1:2:end,:,:), tx_data_hdf5(2:2:end,:,:))
 
 evm = zeros(total_users, total_frames)
 
 snr = zeros(total_users, total_frames)
 
 rf_snr = zeros(total_users, total_frames)
 
for i
 

Function Documentation

◆ axis()

axis ( )

◆ Data()

id Data ( )
virtual

◆ figure()

figure ( 'Name'  )

◆ inspect_agora_results()

function inspect_agora_results ( dataset_filename  ,
verbose   
)

◆ New()

end New ( Beacon  RSSI)

◆ plot() [1/4]

plot ( evm.'  ,
'LineWidth'  ,
 
)

◆ plot() [2/4]

plot ( rf_snr.'  ,
'LineWidth'  ,
 
)

◆ plot() [3/4]

plot ( rx_beacon_rssi.'  ,
'LineWidth'  ,
 
)

◆ plot() [4/4]

plot ( snr.'  ,
'LineWidth'  ,
 
)

◆ Samples()

Samples ( complex  )

◆ set()

set ( gca  ,
'FontSize ,
18   
)
Here is the caller graph for this function:

◆ tiledlayout()

tiledlayout ( ,
 
)

◆ type()

* for complex type ( native float  )

◆ ylabel() [1/4]

ylabel ( 'Beacon RSSI(dB)'  )

◆ ylabel() [2/4]

ylabel ( 'EVM SNR(dB)'  )

◆ ylabel() [3/4]

ylabel ( 'EVM(%)'  )

◆ ylabel() [4/4]

ylabel ( 'Pilot SNR(dB)'  ) &

Variable Documentation

◆ Beacon

end Beacon

◆ cl_sdr_id

cl_sdr_id = h5readatt(dataset_filename, group_id, 'CL_SDR_ID')

◆ configs

configs
Initial value:
= [samples_per_slot tx_zero_prefix_len data_size data_start data_stop fft_size cp_len ...
total_dl_symbols dl_pilot_symbols total_users]

◆ count

clear start count = [total_samples total_users dl_pilot_symbols 1 1]

◆ cp_len

cp_len = double(h5readatt(dataset_filename, group_id, 'CP_LEN'))

◆ data_size

data_size = double(h5readatt(dataset_filename, group_id, 'OFDM_DATA_NUM'))

◆ data_start

data_start = double(h5readatt(dataset_filename, group_id, 'OFDM_DATA_START'))

◆ data_stop

data_stop = double(h5readatt(dataset_filename, group_id, 'OFDM_DATA_STOP'))

◆ dataset_id

Choose the pilot data dataset_id = '/BeaconData'

◆ dl_pilot_symbols

if dl_pilot_symbols = double(h5readatt(dataset_filename, group_id, 'DL_PILOT_SLOTS'))

◆ evm

◆ experiment

experiment = 'MU-MIMO'

◆ fft_size

clear beacon_syms cp_len data_size data_start data_stop dl_pilot_symbols samples_per_slot tx_zero_prefix_len total_dl_symbols fft_size = double(h5readatt(dataset_filename, group_id, 'OFDM_CA_NUM'))

◆ i

for i
Initial value:
[~, ~, evm(:, i), snr(:, i), rf_snr(:, i)] = process_rx_frame(configs, tx_pilot_cxdouble, tx_data_cxdouble, rx_pilot_cxdouble(:, :, :, i), rx_data_cxdouble(:, :, :, i))

◆ inspect_frame

inspect_frame = 100

◆ rf_snr

◆ rx_beacon_cxdouble

Convert to complex double Samples x User x Symbol rx_beacon_cxdouble = complex(rx_beacon_scaled_double(1:2:end, :, :, 1:total_frames), rx_beacon_scaled_double(2:2:end,:, :, 1:total_frames))

◆ rx_beacon_hdf5

clear rx_beacon_hdf5 = h5read(dataset_filename, strcat(group_id,dataset_id))

◆ rx_beacon_rssi

rx_beacon_rssi = process_beacon(rx_beacon_cxdouble, tx_zero_prefix_len)

◆ rx_beacon_scaled_double

clear rx_beacon_scaled_double = double(rx_beacon_hdf5) ./ double(intmax('int16'))

◆ rx_data_cxdouble

clear configs tx_pilot_cxdouble rx_pilot_cxdouble rx_data_cxdouble = rx_syms_cxdouble(:,:,1+dl_pilot_symbols:end, :)

◆ rx_pilot_cxdouble

Convert to complex double Samples x User x Symbol rx_pilot_cxdouble = rx_syms_cxdouble(:,:,1:dl_pilot_symbols, :)

◆ rx_syms_cxdouble

Convert to complex double Samples x User x Symbol x Frame rx_syms_cxdouble = complex(rx_syms_scaled_double(1:2:end, :, :, 1:total_frames), rx_syms_scaled_double(2:2:end,:, :, 1:total_frames))

◆ rx_syms_hdf5

clear rx_syms_hdf5 = h5read(dataset_filename, strcat(group_id,dataset_id))

◆ rx_syms_scaled_double

clear rx_syms_scaled_double = double(rx_syms_hdf5) ./ double(intmax('int16'))

◆ samples_per_slot

samples_per_slot = double(h5readatt(dataset_filename, group_id, 'SLOT_SAMP_LEN'))

◆ snr

◆ start

end start = [1 1 1 1 1]

◆ total_dl_symbols

total_dl_symbols = double(h5readatt(dataset_filename, group_id, 'DL_SLOTS'))

◆ total_frames

end total_frames = double(h5readatt(dataset_filename, group_id, 'MAX_FRAME'))

◆ total_users

if total_users = size(rx_beacon_hdf5, 2)

◆ tx_data_hdf5

tx_data_hdf5 = double(h5read(dataset_filename, strcat(group_id,dataset_id), start, count))

◆ tx_pilot_cxdouble

Convert to complex tx_pilot_cxdouble = complex(tx_pilot_hdf5(1:2:end,:,:), tx_pilot_hdf5(2:2:end,:,:))

◆ tx_pilot_hdf5

tx_pilot_hdf5 = double(h5read(dataset_filename, strcat(group_id,dataset_id), start, count))

◆ tx_syms_cxdouble

Convert to complex type tx_syms_cxdouble = complex(tx_data_hdf5(1:2:end,:,:), tx_data_hdf5(2:2:end,:,:))

◆ tx_zero_prefix_len

tx_zero_prefix_len = double(h5readatt(dataset_filename, group_id, 'TX_ZERO_PREFIX_LEN'))

◆ verbose

Display Info if verbose = "false"
total_frames
end total_frames
Definition: inspect_agora_results.m:13
rx_pilot_cxdouble
Split off pilots and data rx_pilot_cxdouble
Definition: inspect_agora_results.m:83
rx_data_cxdouble
rx_data_cxdouble
Definition: inspect_agora_results.m:84
i
for i
Definition: inspect_agora_results.m:120
configs
configs
Definition: inspect_agora_results.m:86
tx_pilot_cxdouble
Convert to complex tx_pilot_cxdouble
Definition: inspect_agora_results.m:99