main content

extract pbch symbols and channel estimates for decoding -凯发k8网页登录

extract physical broadcast channel (pbch) symbols from a received grid and associated channel estimates in preparation for decoding a beamformed pbch.

pbch coding and beamforming

create a random sequence of binary values corresponding to a bch codeword. the length of the codeword is 864, as specified in ts 38.212 section 7.1.5. using the codeword, create symbols and indices for a pbch transmission. specify the physical layer cell identity number.

e = 864;
cw = randi([0 1],e,1);
ncellid = 17;
v = 0;
pbchtxsym = nrpbch(cw,ncellid,v);
pbchind = nrpbchindices(ncellid);

use nrextractresources to create indices for the two transmit antennas of a beamformed pbch. use these indices to map the beamformed pbch into the transmitter resource array.

carrier = nrcarrierconfig('nsizegrid',20);
p = 2;
txgrid = nrresourcegrid(carrier,p);
f = [1 0.3i];
[~,bfind] = nrextractresources(pbchind,txgrid);
txgrid(bfind) = pbchtxsym*f;

ofdm modulate the pbch symbols mapped into the transmitter resource array.

txwaveform = nrofdmmodulate(carrier,txgrid);

pbch transmission and decoding

create and apply a channel matrix to the waveform. receive the transmitted waveforms.

r = 3;
h = dftmtx(max([p r]));
h = h(1:p,1:r);
h = h/norm(h);
rxwaveform = txwaveform*h;

create channel estimates including beamforming.

 hestgrid = repmat(permute(h.'*f.',[3 4 1 2]),[240 4]);
 nest = 0;

demodulate the received waveform using orthogonal frequency division multiplexing (ofdm).

 rxgrid = nrofdmdemodulate(carrier,rxwaveform);

in preparation for pbch decoding, extract symbols from the received grid and the channel estimate grid.

[pbchrxsym,pbchhestsym] = nrextractresources(pbchind,rxgrid,hestgrid);
scatterplot(pbchrxsym(:),[],[],'y ');
title('received pbch constellation');

figure scatter plot contains an axes object. the axes object with title received pbch constellation, xlabel in-phase, ylabel quadrature contains a line object which displays its values using only markers. this object represents channel 1.

equalize the symbols by performing mmse equalization on the extracted resources. plot the results.

pbcheqsym = nrequalizemmse(pbchrxsym,pbchhestsym,nest);
scatterplot(pbcheqsym(:),[],[],'y ');
title('equalized pbch constellation');

figure scatter plot contains an axes object. the axes object with title equalized pbch constellation, xlabel in-phase, ylabel quadrature contains a line object which displays its values using only markers. this object represents channel 1.

retrieve soft bits by performing pbch decoding on the equalized symbols.

pbchbits = nrpbchdecode(pbcheqsym,ncellid,v)
pbchbits = 864×1
1010 ×
   -2.0000
   -2.0000
    2.0000
   -2.0000
   -2.0000
    2.0000
    2.0000
   -2.0000
   -2.0000
   -2.0000
      ⋮

see also

functions

  • |
网站地图