main content

nr ssb beam sweeping -凯发k8网页登录

this example shows how to employ beam sweeping at both the transmitter (gnb) and receiver (ue) ends of a 5g nr system. using synchronization signal blocks (ssb), this example illustrates some of the beam management procedures used during initial access. to accomplish beam sweeping, the example uses several components from phased array system toolbox™.

introduction

the support of millimeter wave (mmwave) frequencies requires directional links, which led to the specification of beam management procedures for initial access in nr. beam management is a set of layer 1 (physical) and layer 2 (medium access control) procedures to acquire and maintain a set of beam pair links (a beam used at gnb paired with a beam used at ue). beam management procedures are applied for both downlink and uplink transmission and reception [ 1 ], [ 2 ]. these procedures include:

  • beam sweeping

  • beam measurement

  • beam determination

  • beam reporting

  • beam recovery

this example focuses on initial access procedures for idle users when a connection is established between the user equipment (ue) and access network node (gnb). at the physical layer, using synchronization signal blocks (ssb) transmitted as a burst in the downlink direction (gnb to ue), the example highlights both transmit/receive point (trp) beam sweeping and ue beam sweeping to establish a beam pair link. among the multiple beam management procedures, tr 38.802 defines this dual-end sweep as procedure p-1 [ 1 ].

once connected, the same beam pair link can be used for subsequent transmissions. if necessary, the beams are further refined using csi-rs (for downlink) and srs (for uplink). in case of beam failure, these pair links can be reestablished. for an example of beam pair refinement, see .

this example generates an nr synchronization signal burst, beamforms each of the ssbs within the burst to sweep over both azimuth and elevation directions, transmits this beamformed signal over a spatial scattering channel, and processes this received signal over the multiple receive-end beams. the example measures the reference signal received power (rsrp) for each of the transmit-receive beam pairs (in a dual loop) and determines the beam pair link with the maximum rsrp. this beam pair link thus signifies the best beam-pair at transmit and receive ends for the simulated spatial scenario. this figure shows the main processing steps with the beam management ones highlighted in color.

rng(211);                           % set rng state for repeatability

simulation parameters

define system parameters for the example. modify these parameters to explore their impact on the system.

prm.ncellid = 1;                    % cell id
prm.freqrange = 'fr1';              % frequency range: 'fr1' or 'fr2'
prm.centerfreq = 3.5e9;             % hz
prm.ssblockpattern = 'case b';      % case a/b/c/d/e
prm.ssbtransmitted = [ones(1,8) zeros(1,0)];   % 4/8 or 64 in length
prm.txarraysize = [8 8];            % transmit array size, [rows cols]
prm.txazlim = [-60 60];             % transmit azimuthal sweep limits
prm.txellim = [-90 0];              % transmit elevation sweep limits
prm.rxarraysize = [2 2];            % receive array size, [rows cols]
prm.rxazlim = [-180 180];           % receive azimuthal sweep limits
prm.rxellim = [0 90];               % receive elevation sweep limits
prm.elevationsweep = false;         % enable/disable elevation sweep
prm.snrdb = 30;                     % snr, db
prm.rsrpmode = 'ssswdmrs';          % {'ssswdmrs', 'sssonly'}

the example uses these parameters:

  • cell id for a single-cell scenario with a single bs and ue

  • frequency range, as a string to designate fr1 or fr2 operation

  • center frequency, in hz, dependent on the frequency range

  • synchronization signal block pattern as one of case a/b/c for fr1 and case d/e for fr2. this also selects the subcarrier spacing.

  • transmitted ssbs in the pattern, as a binary vector of length 4 or 8 for fr1 and length 64 for fr2. the number of ssbs transmitted sets the number of beams at both transmit and receive ends.

  • transmit array size, as a two-element row vector specifying the number of antenna elements in the rows and columns of the transmit array, respectively. a uniform rectangular array (ura) is used when both values are greater than one.

  • transmit azimuthal sweep limits in degrees to specify the starting and ending azimuth angles for the sweep

  • transmit elevation sweep limits in degrees to specify the starting and ending elevation angles for the sweep

  • receive array size, as a two-element row vector specifying the number of antenna elements in the rows and columns of the receive array, respectively. a uniform rectangular array (ura) is used when both values are greater than one.

  • receive azimuthal sweep limits in degrees to specify the starting and ending azimuth angles for the sweep

  • receive elevation sweep limits in degrees to specify the starting and ending elevation angles for the sweep

  • enable or disable elevation sweep for both transmit and receive ends. enable elevation sweep for fr2 and/or uras

  • signal-to-noise ratio in db

  • measurement mode for ssb to specify the use of only secondary synchronization signals ('sssonly') or use of pbch dm-rs along with secondary synchronization signals ('ssswdmrs')

prm = validateparams(prm);

synchronization signal burst configuration

set up the synchronization signal burst parameters by using the specified system parameters. for initial access, set the ssb periodicity to 20 ms.

txburst = nrwavegenssburstconfig;
txburst.blockpattern = prm.ssblockpattern;
txburst.transmittedblocks = prm.ssbtransmitted;
txburst.period = 20;
txburst.subcarrierspacingcommon = prm.subcarrierspacingcommon;
% configure an nrdlcarrierconfig object to use the synchronization signal
% burst parameters and to disable other channels. this object will be used
% by nrwaveformgenerator to generate the ss burst waveform.
cfgdl = configurewaveformgenerator(prm,txburst);

refer to the tutorial synchronization signal blocks and bursts for more details on synchronization signal blocks and bursts.

burst generation

create the ss burst waveform [ 3 ] by calling the nrwaveformgenerator function. the generated waveform is not yet beamformed.

burstwaveform = nrwaveformgenerator(cfgdl);
% display spectrogram of ss burst waveform
figure;
ofdminfo = nrofdminfo(cfgdl.scscarriers{1}.nsizegrid,prm.scs);
nfft = ofdminfo.nfft;
spectrogram(burstwaveform,ones(nfft,1),0,nfft,'centered',ofdminfo.samplerate,'yaxis','minthreshold',-130);
title('spectrogram of ss burst waveform')

channel configuration

configure a spatial scattering mimo channel channel. this channel model applies free space path loss and, optionally, other atmospheric attenuations to the input. specify the locations for the bs and ue as [x,y,z] coordinates in a cartesian system. depending on the array sizes specified, employ either uniform linear arrays (ula) or uniform rectangular arrays (ura). use isotropic antenna elements for the arrays.

c = physconst('lightspeed');   % propagation speed
lambda = c/prm.centerfreq;     % wavelength
prm.postx = [0;0;0];           % transmit array position, [x;y;z], meters
prm.posrx = [100;50;0];        % receive array position, [x;y;z], meters
torxrange = rangeangle(prm.postx,prm.posrx);
sploss = fspl(torxrange,lambda);    % free space path loss
% transmit array
if prm.istxura
    % uniform rectangular array
    arraytx = phased.ura(prm.txarraysize,0.5*lambda, ...
        'element',phased.isotropicantennaelement('backbaffled',true));
else
    % uniform linear array
    arraytx = phased.ula(prm.numtx, ...
        'elementspacing',0.5*lambda, ...
        'element',phased.isotropicantennaelement('backbaffled',true));
end
% receive array
if prm.isrxura
    % uniform rectangular array
    arrayrx = phased.ura(prm.rxarraysize,0.5*lambda, ...
        'element',phased.isotropicantennaelement);
else
    % uniform linear array
    arrayrx = phased.ula(prm.numrx, ...
        'elementspacing',0.5*lambda, ...
        'element',phased.isotropicantennaelement);
end
% scatterer locations
prm.fixedscatmode = true;
if prm.fixedscatmode
    % fixed single scatterer location
    prm.scatpos = [50; 80; 0];
else
    % generate scatterers at random positions
    nscat = 10;        % number of scatterers
    azrange = -180:180;
    elrange = -90:90;
    randazorder = randperm(length(azrange));
    randelorder = randperm(length(elrange));
    azanginsph = azrange(randazorder(1:nscat));
    elanginsph = elrange(randelorder(1:nscat));
    r = 20;            % radius
    [x,y,z] = sph2cart(deg2rad(azanginsph),deg2rad(elanginsph),r);
    prm.scatpos = [x;y;z]   (prm.postx   prm.posrx)/2;
end
% configure channel
channel = phased.scatteringmimochannel;
channel.propagationspeed = c;
channel.carrierfrequency = prm.centerfreq;
channel.samplerate = ofdminfo.samplerate;
channel.simulatedirectpath = false;
channel.channelresponseoutputport = true;
channel.polarization = 'none';
channel.transmitarray = arraytx;
channel.transmitarrayposition = prm.postx;
channel.receivearray = arrayrx;
channel.receivearrayposition = prm.posrx;
channel.scattererspecificationsource = 'property';
channel.scattererposition = prm.scatpos;
channel.scatterercoefficient = ones(1,size(prm.scatpos,2));
% get maximum channel delay
[~,~,tau] = channel(complex(randn(ofdminfo.samplerate*1e-3,prm.numtx), ...
    randn(ofdminfo.samplerate*1e-3,prm.numtx)));
maxchdelay = ceil(max(tau)*ofdminfo.samplerate);

transmit-end beam sweeping

to achieve trp beam sweeping, beamform each of the ss blocks in the generated burst using analog beamforming. based on the number of ss blocks in the burst and the sweep ranges specified, determine both the azimuth and elevation directions for the different beams. then beamform the individual blocks within the burst to each of these directions.

% number of beams at both transmit and receive ends
numbeams = sum(txburst.transmittedblocks);
% transmit beam angles in azimuth and elevation, equi-spaced
azbw = beamwidth(arraytx,prm.centerfreq,'cut','azimuth');
elbw = beamwidth(arraytx,prm.centerfreq,'cut','elevation');
txbeamang = hgetbeamsweepangles(numbeams,prm.txazlim,prm.txellim, ...
    azbw,elbw,prm.elevationsweep);
% for evaluating transmit-side steering weights
steervectx = phased.steeringvector('sensorarray',arraytx, ...
    'propagationspeed',c);
% get the set of ofdm symbols occupied by each ssb
numblocks = length(txburst.transmittedblocks);
burststartsymbols = ssburststartsymbols(txburst.blockpattern,numblocks);
burststartsymbols = burststartsymbols(txburst.transmittedblocks==1);
burstoccupiedsymbols = burststartsymbols.'   (1:4);
% apply steering per ofdm symbol for each ssb
gridsymlengths = repmat(ofdminfo.symbollengths,1,cfgdl.numsubframes);
%   repeat burst over numtx to prepare for steering
strtxwaveform = repmat(burstwaveform,1,prm.numtx)./sqrt(prm.numtx);
for ssb = 1:numbeams
    % extract ssb waveform from burst
    blocksymbols = burstoccupiedsymbols(ssb,:);
    startssbind = sum(gridsymlengths(1:blocksymbols(1)-1)) 1;
    endssbind = sum(gridsymlengths(1:blocksymbols(4)));
    ssbwaveform = strtxwaveform(startssbind:endssbind,1);
    % generate weights for steered direction
    wt = steervectx(prm.centerfreq,txbeamang(:,ssb));
    % apply weights per transmit element to ssb
    strtxwaveform(startssbind:endssbind,:) = ssbwaveform.*(wt');
end

the beamformed burst waveform is then transmitted over the spatially-aware scattering channel.

receive-end beam sweeping and measurement

for receive-end beam sweeping, the transmitted beamformed burst waveform is received successively over each receive beam. for n transmit beams and m receive beams in procedure p-1, each of the n beams is transmitted m times from gnb so that each transmit beam is received over the m receive beams.

the example assumes both n and m to be equal to the number of ssbs in the burst. for simplicity, the example generates only one burst, but to mimic the burst reception over the air m times, the receiver processes this single burst m times.

this figure shows a beam-based diagram for the sweeps at both gnb and ue for n = m = 4, in the azimuthal plane. the diagram shows the time taken for the dual sweep, where each interval at gnb corresponds to an ssb and each interval at the ue corresponds to the ss burst. for the depicted scenario, beams s3 and u2 are highlighted as the selected beam-pair link notionally. the example implements the dual-sweep over a time duration of n*m time instants.

the receive processing of the transmitted burst includes

  • application of the spatially-aware fading channel

  • receive gain to compensate for the induced path loss and awgn

  • receive-end beamforming

  • timing correction

  • ofdm demodulation

  • extracting the known ssb grid

  • measuring the rsrp based on the specified measurement mode

the processing repeats these steps for each of the receive beams, then selects the best beam-pair based on the complete set of measurements made.

to highlight beam sweeping, the example assumes known ssb information at the receiver. for more details on recovery processing see nr cell search and mib and sib1 recovery.

for the idle mode ss-rsrp measurement, use either only the secondary synchronization signals (sss) or the physical broadcast channel (pbch) demodulation reference signals (dm-rs) in addition to the sss (section 5.1.1. of [ 4 ]). specify this by the rsrpmode parameter of the example. for fr2, the rsrp measurement is based on the combined signal from antenna elements, while the measurement is per antenna element for fr1.

% receive beam angles in azimuth and elevation, equi-spaced
azbw = beamwidth(arrayrx,prm.centerfreq,'cut','azimuth');
elbw = beamwidth(arrayrx,prm.centerfreq,'cut','elevation');
rxbeamang = hgetbeamsweepangles(numbeams,prm.rxazlim,prm.rxellim, ...
    azbw,elbw,prm.elevationsweep);
% for evaluating receive-side steering weights
steervecrx = phased.steeringvector('sensorarray',arrayrx, ...
    'propagationspeed',c);
% awgn level
snr = 10^(prm.snrdb/20);                        % convert to linear gain
n0 = 1/(sqrt(2.0*prm.numrx*double(ofdminfo.nfft))*snr); % noise std. dev.
% receive gain in linear terms, to compensate for the path loss
rxgain = 10^(sploss/20);
% generate a reference grid for timing correction
%   assumes an ssb in first slot
carrier = nrcarrierconfig('ncellid',prm.ncellid);
carrier.nsizegrid = cfgdl.scscarriers{1}.nsizegrid;
carrier.subcarrierspacing = prm.scs;
pssref = nrpss(carrier.ncellid);
pssind = nrpssindices;
ibar_ssb = 0;
pbchdmrsref = nrpbchdmrs(carrier.ncellid,ibar_ssb);
pbchdmrsind = nrpbchdmrsindices(carrier.ncellid);
pssgrid = zeros([240 4]);
pssgrid(pssind) = pssref;
pssgrid(pbchdmrsind) = pbchdmrsref;
refgrid = zeros([12*carrier.nsizegrid ofdminfo.symbolsperslot]);
burstoccupiedsubcarriers = carrier.nsizegrid*6   (-119:120).';
refgrid(burstoccupiedsubcarriers, ...
    burstoccupiedsymbols(1,:)) = pssgrid;
% loop over all receive beams
rsrp = zeros(numbeams,numbeams);
for ridx = 1:numbeams
    % fading channel, with path loss
    txwave = [strtxwaveform; zeros(maxchdelay,size(strtxwaveform,2))];
    fadwave = channel(txwave);
    % receive gain, to compensate for the path loss
    fadwaveg = fadwave*rxgain;
    % add wgn
    noise = n0*complex(randn(size(fadwaveg)),randn(size(fadwaveg)));
    rxwaveform = fadwaveg   noise;
    % generate weights for steered direction
    wr = steervecrx(prm.centerfreq,rxbeamang(:,ridx));
    % apply weights per receive element
    if strcmp(prm.freqrange, 'fr1')
        strrxwaveform = rxwaveform.*(wr');
    else  % for fr2, combine signal from antenna elements
        strrxwaveform = rxwaveform*conj(wr);
    end
    % correct timing
    offset = nrtimingestimate(carrier, ...
        strrxwaveform(1:ofdminfo.samplerate*1e-3,:),refgrid*wr(1)');
    if offset > maxchdelay
        offset = 0;
    end
    strrxwaveforms = strrxwaveform(1 offset:end,:);
    % ofdm demodulate
    rxgrid = nrofdmdemodulate(carrier,strrxwaveforms);
    % loop over all ssbs in rxgrid (transmit end)
    for tidx = 1:numbeams
        % get each ssb grid
        rxssbgrid = rxgrid(burstoccupiedsubcarriers, ...
            burstoccupiedsymbols(tidx,:),:);
        if strcmpi(prm.rsrpmode,'ssswdmrs')
            meas = nrssbmeasurements(rxssbgrid,carrier.ncellid,mod(tidx-1,8));
        else
            meas = nrssbmeasurements(rxssbgrid,carrier.ncellid);
        end
        rsrp(ridx,tidx) = max(meas.rsrpperantenna);
    end
end

beam determination

after the dual-end sweep and measurements are complete, determine the best beam-pair link based on the rsrp measurement.

[m,i] = max(rsrp,[],'all','linear');    % first occurrence is output
% i is column-down first (for receive), then across columns (for transmit)
[rxbeamid,txbeamid] = ind2sub([numbeams numbeams],i(1));
% display the selected beam pair
disp(['selected beam pair with rsrp: ' num2str(rsrp(rxbeamid, ...
    txbeamid)) ' dbm', 13 '  transmit #' num2str(txbeamid) ...
    ' (azimuth: ' num2str(txbeamang(1,txbeamid)) ', elevation: ' ...
    num2str(txbeamang(2,txbeamid)) ')' 13 '  receive #' num2str(rxbeamid) ...
    ' (azimuth: ' num2str(rxbeamang(1,rxbeamid)) ', elevation: ' ...
    num2str(rxbeamang(2,rxbeamid)) ')' ]);
% display final beam pair patterns
h = figure('position',figposition([32 55 32 40]),'menubar','none');
h.name = 'selected transmit array response pattern';
wt = steervectx(prm.centerfreq,txbeamang(:,txbeamid));
pattern(arraytx,prm.centerfreq,'propagationspeed',c,'weights',wt);
h = figure('position',figposition([32 55 32 40]),'menubar','none');
h.name = 'selected receive array response pattern';
wr = steervecrx(prm.centerfreq,rxbeamang(:,rxbeamid));
pattern(arrayrx,prm.centerfreq,'propagationspeed',c,'weights',wr);
% plot mimo scenario with tx, rx, scatterers, and determined beams. beam
% patterns in this figure resemble the power patterns in linear scale.
prmscene = struct();
prmscene.txarray = arraytx;
prmscene.rxarray = arrayrx;
prmscene.txarraypos = prm.postx;
prmscene.rxarraypos = prm.posrx;
prmscene.scattererspos = prm.scatpos;
prmscene.lambda = lambda;
prmscene.arrayscaling = 1;     % to enlarge antenna arrays in the plot
prmscene.maxtxbeamlength = 45; % maximum length of transmit beams in the plot
prmscene.maxrxbeamlength = 25; % maximum length of receive beam in the plot
hplotspatialmimoscene(prmscene,wt,wr);
if ~prm.elevationsweep
    view(2);
end
selected beam pair with rsrp: 45.0787 dbm  transmit #8 (azimuth: 60, elevation: 0)  receive #6 (azimuth: 90, elevation: 0)

these plots highlight the transmit directivity pattern, receive directivity pattern, and the spatial scene, respectively. the results are dependent on the individual beam directions used for the sweeps. the spatial scene offers a combined view of the transmit and receive arrays and the respective determined beams, along with the scatterers.

summary and further exploration

this example highlights the p-1 beam management procedure by using synchronization signal blocks for transmit-end and receive-end beam sweeping. by measuring the reference signal received power for ssbs, you can identify the best beam pair link for a selected spatial environment.

the example allows variation on frequency range, ssb block pattern, number of ssbs, transmit and receive array sizes, transmit and receive sweep ranges, and the measuring mode. to see the impact of parameters on the beam selection, experiment with different values. the receive processing is simplified to highlight the beamforming aspects for the example.

for an example of the p-2 procedures of transmit-end beam sweeping using csi-rs signals for the downlink, see . you can use these procedures for beam refinement and adjustment in the connected mode, once the initial beam pair links are established [ 5 ], [ 6 ].

references

  1. 3gpp tr 38.802. "study on new radio access technology physical layer aspects." 3rd generation partnership project; technical specification group radio access network.

  2. giordani, m., m. polese, a. roy, d. castor, and m. zorzi. "a tutorial on beam management for 3gpp nr at mmwave frequencies." ieee comm. surveys & tutorials, vol. 21, no. 1, q1 2019.

  3. 3gpp ts 38.211. "nr; physical channels and modulation." 3rd generation partnership project; technical specification group radio access network.

  4. 3gpp ts 38.215. "nr; physical layer measurements." 3rd generation partnership project; technical specification group radio access network.

  5. giordani, m., m. polese, a. roy, d. castor, and m. zorzi. "standalone and non-standalone beam management for 3gpp nr at mmwaves." ieee comm. mag., april 2019, pp. 123-129.

  6. onggosanusi, e., s. md. rahman, et al. "modular and high-resolution channel state information and beam management for 5g nr." ieee comm. mag., march 2018, pp. 48-55.

local functions

function prm = validateparams(prm)
% validate user specified parameters and return updated parameters
%
% only cross-dependent checks are made for parameter consistency.
    if strcmpi(prm.freqrange,'fr1')
        if prm.centerfreq > 7.125e9 || prm.centerfreq < 410e6
            error(['specified center frequency is outside the fr1 ', ...
                   'frequency range (410 mhz - 7.125 ghz).']);
        end
        if strcmpi(prm.ssblockpattern,'case d') ||  ...
           strcmpi(prm.ssblockpattern,'case e')
            error(['invalid ssblockpattern for selected fr1 frequency ' ...
                'range. ssblockpattern must be one of ''case a'' or ' ...
                '''case b'' or ''case c'' for fr1.']);
        end
        if ~((length(prm.ssbtransmitted)==4) || ...
             (length(prm.ssbtransmitted)==8))
            error(['ssbtransmitted must be a vector of length 4 or 8', ...
                   'for fr1 frequency range.']);
        end
        if (prm.centerfreq <= 3e9) && (length(prm.ssbtransmitted)~=4)
            error(['ssbtransmitted must be a vector of length 4 for ' ...
                   'center frequency less than or equal to 3ghz.']);
        end
        if (prm.centerfreq > 3e9) && (length(prm.ssbtransmitted)~=8)
            error(['ssbtransmitted must be a vector of length 8 for ', ...
                   'center frequency greater than 3ghz and less than ', ...
                   'or equal to 7.125ghz.']);
        end
    else % 'fr2'
        if prm.centerfreq > 52.6e9 || prm.centerfreq < 24.25e9
            error(['specified center frequency is outside the fr2 ', ...
                   'frequency range (24.25 ghz - 52.6 ghz).']);
        end
        if ~(strcmpi(prm.ssblockpattern,'case d') || ...
                strcmpi(prm.ssblockpattern,'case e'))
            error(['invalid ssblockpattern for selected fr2 frequency ' ...
                'range. ssblockpattern must be either ''case d'' or ' ...
                '''case e'' for fr2.']);
        end
        if length(prm.ssbtransmitted)~=64
            error(['ssbtransmitted must be a vector of length 64 for ', ...
                   'fr2 frequency range.']);
        end
    end
    prm.numtx = prod(prm.txarraysize);
    prm.numrx = prod(prm.rxarraysize);
    if prm.numtx==1 || prm.numrx==1
        error(['number of transmit or receive antenna elements must be', ...
               ' greater than 1.']);
    end
    prm.istxura = (prm.txarraysize(1)>1) && (prm.txarraysize(2)>1);
    prm.isrxura = (prm.rxarraysize(1)>1) && (prm.rxarraysize(2)>1);
    if ~( strcmpi(prm.rsrpmode,'sssonly') || ...
          strcmpi(prm.rsrpmode,'ssswdmrs') )
        error(['invalid rsrp measuring mode. specify either ', ...
               '''sssonly'' or ''ssswdmrs'' as the mode.']);
    end
    % select scs based on ssblockpattern
    switch lower(prm.ssblockpattern)
        case 'case a'
            scs = 15;
            cbw = 10;
            scscommon = 15;
        case {'case b', 'case c'}
            scs = 30;
            cbw = 25;
            scscommon = 30;
        case 'case d'
            scs = 120;
            cbw = 100;
            scscommon = 120;
        case 'case e'
            scs = 240;
            cbw = 200;
            scscommon = 120;
    end
    prm.scs = scs;
    prm.channelbandwidth = cbw;
    prm.subcarrierspacingcommon = scscommon;
end
function ssbstartsymbols = ssburststartsymbols(ssbblockpattern,lmax)
% starting ofdm symbols of ss burst.
    % 'alln' gives the overall set of ss block indices 'n' described in
    % ts 38.213 section 4.1, from which a subset is used for each case a-e
    alln = [0; 1; 2; 3; 5; 6; 7; 8; 10; 11; 12; 13; 15; 16; 17; 18];
    cases = {'case a' 'case b' 'case c' 'case d' 'case e'};
    m = [14 28 14 28 56];
    i = {[2 8] [4 8 16 20] [2 8] [4 8 16 20] [8 12 16 20 32 36 40 44]};
    nn = [2 1 2 16 8];
    caseidx = find(strcmpi(ssbblockpattern,cases));
    if (any(caseidx==[1 2 3]))
        if (lmax==4)
            nn = nn(caseidx);
        elseif (lmax==8)
            nn = nn(caseidx) * 2;
        end
    else
        nn = nn(caseidx);
    end
    n = alln(1:nn);
    ssbstartsymbols = (i{caseidx}   m(caseidx)*n).';
    ssbstartsymbols = ssbstartsymbols(:).';
end
function cfgdl = configurewaveformgenerator(prm,txburst)
% configure an nrdlcarrierconfig object to be used by nrwaveformgenerator
% to generate the ss burst waveform.
    cfgdl = nrdlcarrierconfig;
    cfgdl.scscarriers{1}.subcarrierspacing = prm.scs;
    if (prm.scs==240)
        cfgdl.scscarriers = [cfgdl.scscarriers cfgdl.scscarriers];
        cfgdl.scscarriers{2}.subcarrierspacing = prm.subcarrierspacingcommon;
        cfgdl.bandwidthparts{1}.subcarrierspacing = prm.subcarrierspacingcommon;
    else
        cfgdl.bandwidthparts{1}.subcarrierspacing = prm.scs;
    end
    cfgdl.pdsch{1}.enable = false;
    cfgdl.pdcch{1}.enable = false;
    cfgdl.channelbandwidth = prm.channelbandwidth;
    cfgdl.frequencyrange = prm.freqrange;
    cfgdl.ncellid = prm.ncellid;
    cfgdl.numsubframes = 5;
    cfgdl.windowingpercent = 0;
    cfgdl.ssburst = txburst;
end

see also

objects

  • (phased array system toolbox) | (phased array system toolbox)

related topics

网站地图