|
RENEWLab
1.1.0
RENEW project
|
Functions | |
| fadec (i)=0 | |
| num clusters if | length (angcTx) |
| end if | length (angspdRx) |
| end if | length (angspdTx) |
| end if | length (dlycns) |
| end if | length (dlyspdns) |
| end if | length (powcdB) |
| np, 1 | zeros () |
| urx (:, i) | |
| utx (:, i) | |
| nsub for fading if | fadec (ic) nsubi |
| angpTx (I) | |
| dlypns (I) | |
| powp (I) | |
| end Compute the spatial signatures urx and utx | urx (:, ip) |
| utx (:, ip) | |
| zeros ((idlyMax-idly), 1)] | |
| x delayed vector per idly | y (:, irx) |
| node_ue1 | sdr_txgainctrl () |
| gain control end node_bs | sdrsync (1) |
| synchronize delays only for BS node_ue1 | sdrsync (0) |
| end node_ue1 | sdrrxsetup () |
| node_bs | set_config (chained_mode, 1) |
| configure the if n_ue node_ue2 | set_config (chained_mode, 0) |
| end node_bs | sdr_txbeacon (N_ZPAD_PRE) |
| Burn beacon to the BS(1) RAM node_ue1.sdrtx(tx_data(Burn data to the UE RAM if n_ue node_ue2 | sdrtx (tx_data(:, 2)) |
| end node_bs | sdr_activate_rx () |
| activate reading stream node_ue1 | sdr_setcorr () % activate correlator if n_ue >1 node_ue2.sdr_setcorr() end %node_bs.sdrtrigger(trig) |
| read data node_bs | sdr_close () |
| end | fprintf ('Length of the received vector from HW:\tUE:%d\n', data0_len) |
| fprintf ("No valid channel type was given!") | |
Variables | |
| function | y |
| nvar = tx_var / 10^(0.1*snr) | |
| noise variance per data sample | H_ul = ones(size(tx_data.')) |
| noise vector | W_ul |
| elseif | chan_type |
| hvar = 1 | |
| if | n_ue |
| output vector | y0 = H_ul.*tx_data.' |
| number of subpaths per cluster | fmaxHz = 0 |
| max Doppler spread in Hz NOT USED | ! freqErrHz = 0 |
| constant frequency error in Hz | dlyns =0 |
| constant delay in ns | angMotion =0 |
| angle of motion KEEP at Cluster parameters represented as a vector with one component per cluster | angcRx = [0 90]'*pi/180 |
| RX center angle in radians | angspdRx = 10*pi/180 |
| RX angular spread in radians | angcTx = 0 |
| TX center angle in radians | angspdTx = 0 |
| TX angular spread in radians | dlycns = [0 100]' |
| excess delay of first path in cluster nsec | dlyspdns = 30 |
| delay spread within cluster in nsec | powcdB = [-3 -3]' |
| gain power in dB the power on each cluster | fadec = [1 1]' |
| number of TX antennas | nantRx = n_bs |
| number of RX antennas | dsepTx = 0.5 |
| TX antenna separation | dsepRx = 0.5 |
| RX antenna separation | nov = 16 |
| oversampling ratio | tx_var = mean(abs(tx_data).^2 ) * (64/48) |
| noise variance per data sample Carrier and sample rate | fsampMHz = 5 |
| sample frequency in MHz | x = tx_data |
| Convert scalar parameters to vectors | nc = length(angcRx) |
| end Compute total number of paths | ncfade = sum(fadec) |
| num fading clusters | np = nsub*ncfade + nc-ncfade |
| AoA in radians | angpTx = zeros(np,1) |
| AoD in radians | dlypns = zeros(np,1) |
| delay in us of each path | powp = zeros(np,1) |
| power of each path in linear scale | ip = 0 |
| Spatial signature of each path | urx = double.empty() |
| else | nsubi = 1 |
| end | I = (ip+1:ip+nsubi)' |
| omgiTx = 2*pi*dsepTx*cos(angpTx) | |
| end Generate complex gains and Doppler shifts | gain = sqrt(powp).*exp(2*pi*1i*rand(np,1)) |
| complex gain of each path | fdHz = fmaxHz*cos(angpRx-angMotion) + freqErrHz |
| Doppler shift in | Hz |
| sample period in ms | nt = size(x,1) |
| number of input samples | ntx = nt*nov |
| num input time samples after upconverting Compute size of y based on maximum path delay | ts1 = tsms/nov |
| sample period of upcoverted signal in ms | idlyMax = max( round((dlypns+dlyns)*1e-6/ts1)) |
| idlyMax expressed in units of ts1 | nty = ntx + idlyMax |
| Upsample | x1 = resample(x,nov,1) |
| t = (0:nty-1)'*ts1*1e-3 | |
| must be in sec since dfHz is in sec | ! y = zeros(nty,nantRx) |
| Filter the signal by summing each path Sum shifted and scaled versions of x1 to create the output y for | irx |
| delay of path ip | xs = [zeros(idly,1) |
| Add noise | ny = size(y0,1) |
| w = sqrt(nvar/2)*(randn(ny,nantRx) + 1i*randn(ny,nantRx)) | |
| n_samp = bs_param.n_samp | |
| node_bs = iris_py(bs_param) | |
| initialize BS | node_ue1 = iris_py(ue_param(1)) |
| initialize UE if n_ue | node_ue2 = iris_py(ue_param(2)) |
| end | trig = 1 |
| chained_mode = 0 | |
| configure the | BS |
| set trigger to start the frame Iris Rx Only UL | data |
| set trigger to start the frame Iris Rx Only UL | data0_len = node_bs.sdrrx(n_samp) |
| angpTx | ( | I | ) |
| dlypns | ( | I | ) |
|
pure virtual |
| nsub for fading if fadec | ( | ic | ) |
| fprintf | ( | "No valid channel type was given!" | ) |
| powp | ( | I | ) |
| end node_bs sdr_txbeacon | ( | N_ZPAD_PRE | ) |
| Burn beacon to the BS (1) RAM node_ue1.sdrtx(tx_data( Burn data to the UE RAM if n_ue node_ue2 sdrtx | ( | tx_data(:, 2) | ) |
| configure the if n_ue node_ue2 set_config | ( | chained_mode | , |
| 0 | |||
| ) |
| node_bs set_config | ( | chained_mode | , |
| 1 | |||
| ) |
| urx | ( | : | , |
| i | |||
| ) |
| utx | ( | : | , |
| i | |||
| ) |
| utx | ( | : | , |
| ip | |||
| ) |
| zeros | ( | (idlyMax-idly) | , |
| 1 | |||
| ) |
|
virtual |
| angle of motion KEEP at Cluster parameters represented as a vector with one component per cluster angcRx = [0 90]'*pi/180 |
| RX angular spread in radians angcTx = 0 |
| constant delay in ns angMotion =0 |
| RX center angle in radians angspdRx = 10*pi/180 |
| TX center angle in radians angspdTx = 0 |
| configure the BS |
| chained_mode = 0 |
| elseif chan_type |
| set trigger to start the frame Iris Rx Only UL data |
| TX angular spread in radians dlycns = [0 100]' |
| excess delay of first path in cluster nsec dlyspdns = 30 |
| TX antenna separation dsepRx = 0.5 |
| number of RX antennas dsepTx = 0.5 |
| number of subpaths per cluster fmaxHz = 0 |
| noise variance per data sample Carrier and sample rate fsampMHz = 5 |
| else H_ul = ones(size(tx_data.')) |
| hvar = 1 |
| for ip = 0 |
| n_samp = bs_param.n_samp |
| if n_ue |
| number of TX antennas nantRx = n_bs |
| node_bs = iris_py(bs_param) |
| initialize BS node_ue1 = iris_py(ue_param(1)) |
| RX antenna separation nov = 16 |
| else nsubi = 1 |
| sample period in ms nt = size(x,1) |
| Add noise ny = size(y0,1) |
| delay spread within cluster in nsec powcdB = [-3 -3]' |
| end trig = 1 |
| num input time samples after upconverting Compute size of y based on maximum path delay ts1 = tsms/nov |
| oversampling ratio tx_var = mean(abs(tx_data).^2 ) * (64/48) |
| Spatial signature of each path urx = double.empty() |
| sample frequency in MHz x = tx_data |
| else y |