lte hdl mib recovery -凯发k8网页登录
this example shows how to design an lte mib recovery system optimized for hdl code generation and hardware implementation.
introduction
the model presented in this example can be used to locate and decode the mib from lte downlink signals. it builds upon the lte hdl cell search example, adding processing stages to decode the mib. the master information block (mib) message is transmitted in the physical broadcast channel (pbch), and carries essential system information:
number of downlink resource blocks (ndlrb), indicating the system bandwidth
system frame number (sfn)
phich (physical harq indicator channel) configuration
the design is optimized for hdl code generation and the architecture is extensible, allowing additional processing stages to be added, such as indexing and decoding for the pcfich, pdcch and pdsch (see lte hdl sib1 recovery). this design can be implemented on soc platforms using hardware-software co-design and hardware support packages. see .
mib processing stages
in order to decode the mib message this example performs these operations:
cell search and ofdm demodulation
buffering grid data
channel estimation and equalization
pbch indexing - locating pbch within the grid
pbch decoding - decoding pbch, bch, and mib
cell search and ofdm demodulation
lte signal detection, timing and frequency synchronization, and ofdm demodulation are performed on the received data. this produces the grid data and provides information on the subframe number and cell id of the received waveform. the mib message is always carried in subframe 0, and the cellid is used to determine the location of the cell-specific reference signals (crs) for channel estimation, as well as being used to initialize the descrambling sequence for pbch decoder.
buffering grid data
as the mib message is always carried in subframe 0 of the downlink signal, subframe 0 is buffered in a memory bank. at the same time as the subframe is being written to the memory bank, the location of the crs are calculated using the cellid, and crs are sent to the channel estimator.
channel estimation
the crs from the received grid are then compared to the expected values, and the phase offset calculated. the channel estimates for each crs are averaged across time, and linear interpolation is used to estimate the channel for subcarriers which do not contain crs. the channel estimate for the subframe is used to equalize data when it is read from the grid memory.
pbch indexing
the pbch is always allocated to the central 6 resource blocks (rbs) of subframe 0, within the first 4 ofdm symbols of the 2nd slot. it occupies all of the resource elements (res) within this region, excluding the locations allocated to crs. the locations of the crs are calculated using the cellid, then the addresses of the res occupied by the pbch can be calculated (240 locations in total), and the data retrieved from the grid memory bank.
pbch decoding
as the pbch data is read from the grid memory bank it is equalized using the channel estimate. the 240 equalized pbch symbols are buffered, and pbch and bch decoding are attempted for each of the 4 possible versions of the mib within a pbch transport block. each of these versions requires a different descrambling sequence, so descrambling, demodulation, rate recovery, convolutional decoding, and crc check must be attempted for each. if successfully decoded, the crc value gives the cellrefp value - the number of transmit antennas, and the mib bits can be parsed to give the system parameters.
model architecture
the architecture of the lte hdl cell search and mib recovery implementation is shown in the diagram below.
the input to the receiver is baseband i/q data, sampled at 30.72 msps. a 2048-point fft is used for ofdm demodulation, and is sufficient to decode all of the supported lte bandwidths. the resource grid buffer is capable of storing one subframe of lte data. once the receiver has synchronized to a cell, data from the ofdm demodulator is written into the grid buffer. the pbch indexing block then generates the indices of the resource elements which carry the pbch. those resource elements are read out of the grid buffer and equalized, before being passed through the pbch decoder. this architecture is designed to be extensible and scalable so that additional channel indexing and decoding functions can be inserted as needed. for example it can be extended to perform sib1 recovery as shown in the lte hdl sib1 recovery example.
the top level of the ltehdlmibrecovery model is shown below. hdl code can be generated for the hdl lte mib recovery subsystem.
the ltehdlmibrecovery_init.m
script is executed automatically by the model's initfcn
callback. this script generates the datain and startin stimulus signals as well as any of the constants needed to initialize the model. input data can be loaded from a file which, for this example, is an lte signal captured off the air. for information about capturing lte signals off the air see (lte toolbox). alternatively, an lte waveform can be synthesized using lte toolbox functions. to select an input source, change the loadfromfile
parameter in ltehdlmibrecovery_init.m
.
samplingrate = 30.72e6; simparams.ts = 1/samplingrate;
loadfromfile = true;
if loadfromfile load('enodebwaveform.mat'); datain = resample(rxwaveform,samplingrate,fs); else datain = hgeneratedlrxwaveform(); end
hdl optimized lte mib recovery
the structure of the hdl lte mib recovery subsystem is shown below. the downlink sync demod block performs frequency and time synchronization, pss/sss signal detection, and ofdm demodulation. the mib decoder subsystem buffers subframe 0 of the incoming data, performs channel estimation, and attempts to decode the pbch to recover the mib information.
downlink synchronization and demodulation
the downlink sync demod subsystem takes in i/q data at 30.72 msps, and outputs the unequalized downlink resource grid data. it is an instance of the ltehdldownlinksyncdemod model reference, which implements the following functions:
frequency recovery
primary synchronization signal (pss) detection
secondary synchronization signal (sss) detection
timing recovery, based on the pss and sss signals
ofdm demodulation (using a 2048 point fft)
cell id calculation, based on pss and sss detection results
the operation of the ltehdldownlinksyncdemod is described in more detail in the lte hdl cell search example.
mib decoder
the mib decoder subsystem is shown below. it consists of four subsystems: pbch indexing, resource grid memory, channel equalization, and pbch decoder. the order of operations is as follows:
the celldetected input is asserted, preparing the subsystem to receive and process data.
ofdm data is streamed into the mib decoder subsystem, and subframe 0 is stored in the resource grid memory.
the channel equalization subsystem calculates a channel estimate for subframe 0
the pbch indexing block starts generating pbch resource element indices.
those resource elements are then read out of the resource grid memory and equalized by the channel equalization block.
finally the equalized pbch data is passed through the pbch decoder block and the mib is extracted.
resource grid memory
the resource grid memory block contains a memory bank, logic to control reading and writing of the grid memory bank, and logic to locate and output the crs. the memory bank capacity is one subframe of demodulated ofdm data at the largest supported lte bandwidth (20mhz).
the memorybank write controller is responsible for writing subframes of data to the memory bank. the writesubframe input enables the write controller for the appropriate subframes; subframe 0 in the case of the present example. the lte memory bank contains ram of dimensions 14 x 2048 x 16 bit complex values; that is 14 odfm symbols, each containing 2048 complex values. the rsoutputgen subsystem calculates the locations of the cell reference symbols, extracts these from the data as it is written to the grid memory, and outputs these via the griddata output signal.
the griddata output port carries the crs signals, from rsoutputgen, when data is being written to the grid memory (gridwritedone output port is low) and carries data from the lte memory bank when the write to the grid memory is complete (gridwritedone output port is high).
pbch indexing
the pbch indexing block computes the memory addresses required to retrieve the pbch from the grid memory buffer. this is equivalent to the lte toolbox ltepbchindices
function. the data retrieved from the grid memory is then equalized and passed to the pbch decoder for processing. the pbch indexing subsystem becomes active after the data for subframe 0 has been written to the grid memory, as indicated by the gridwritedone output of the resource grid memory subsystem. the pbch is always 240 symbols in length, centered in the middle subcarriers, in the first 4 symbols within the 2nd slot of subframe 0.
channel estimation and equalization
the channel equalization block contains three main subsystems. cellrefgen generates the cell-specific reference signal (crs) symbols using a gold sequence generator. chest performs channel estimation assuming two transmit antennas by using a simple, hardware-friendly channel estimation algorithm. txdivdecode performs transmit diversity decoding to equalize the phase of the received data, using the channel estimates.
the channel estimator assumes the transmitter is using two antennas, generating a channel estimate for each antenna. for each antenna the channel estimator generates a single complex-valued channel estimate for each subcarrier of the subframe using the following algorithm:
estimate the channel at each crs resource element by comparing the received value to the expected symbol value (generated by cellrefgen).
average these channel estimates across time (for the duration of the subframe) to generate a single complex-valued channel estimate for each subcarrier that contains crs symbols.
use linear interpolation to estimate the channel for subcarriers which do not contain crs symbols.
the simple time average algorithm used for the channel estimation assumes low channel mobility. therefore, the channel estimate may not be of sufficient quality to decode waveforms that were transmitted through fast fading channels. the algorithm also avoids using a division operation when calculating the channel estimate at each crs. this means that the amplitude of the received signal will not be corrected, which is suitable for qpsk applications, but will not work for qam, where accurate amplitude correction is required for reliable decoding.
once the channel estimates are calculated for each of the transmit antennas they are used to equalize the griddata as it is read out from the resource grid memory. txdivdecode performs the inverse of the precoding for transmit diversity (as described in of ts 36.211 section 6.3.4.3 [ 1 ]) and produces an equalized output signal, which is then passed to the pbch decoder.
pbch decoder
the pbch decoder performs qpsk demodulation, descrambling, rate recovery, and bch decoding. it then extracts the mib output parameters using the mib interpretation function block. these operations are equivalent to the ltepbchdecode
and ltemib
functions in the lte toolbox.
the pbch controller
stores the equalized data in memory for iterative convolutional decoding attempts. the 4 attempts made at decoding the mib correspond to the 4 repetitions of the mib data per pbch transport block.
bch decoder
the bch decoder quantizes the soft decisions and then decodes the data using the and blocks. the recommended wordlength of soft decisions at the input to the convolutional decoder is 4 bits. however, the bch decoder block receives 20-bit soft decisions as input. therefore the softbitscalingunit block dynamically scales the data so that it utilizes the full dynamic range of the 4 bit soft decisions. the crc decoder block is configured to return the full checksum mismatch value. the crc mask, once checked against the allowed values, provides cellrefp; the number of cell-specific reference signal antenna ports at the transmitter. if the crc checksum does not match one of the accepted values then mib has not been successfully decoded and the pbch controller decides whether or not to initiate another decoding attempt.
when a mib has been successfully decoded, the mib interpretation subsystem extracts and outputs the fields of the message.
performance analysis
quality of the input waveform is an important factor that impacts the decoding performance. common factors that affect signal quality are multi-path propagation conditions, channel attenuation and interference from other cells. the quality of the input waveform can be measured using the cellqualitysearch
function. this function detects lte cells in the input waveform and returns a structure per lte cell containing the following fields:
frequencyoffset: frequency offset obtained by
ltefrequencyoffsets
functionncellid: physical layer cell identity
timingoffset: timing offset of the first frame in the input waveform
rsrqdb: reference signal received quality (rsrq) value in db per ts 36.214 section 5.1.3 [ 2 ]
reportedrsrq: rsrq measurement report (integer between 0 and 34) per ts 36.133 section 9.1.7 [ 3 ]
applying the cellqualitysearch
function to the captured waveform enodebwaveform.mat
used in ltehdlmibrecovery_init.m
returns the following report:
frequencyoffset: 536.8614 ncellid: 76 timingoffset: 12709 rsrqdb: -5.3654 reportedrsrq: 29
frequencyoffset: 536.8614 ncellid: 160 timingoffset: 3108 rsrqdb: -18.1206 reportedrsrq: 3
there are two cells in the captured waveform, one with cell id 76 and one with cell id 160. the cell with ncellid = 76 has a much higher reportedrsrq, indicating that it is a stronger signal. in this example the simulink model decodes the mib for ncellid = 76.
results and display
the scope below shows the key control signals for this example. after a pulse is asserted on the start signal the cell search process is started. successful detection of a cell is indicated by the celldetected signal. when the celldetected signal is asserted the ncellid and tddmode signal become active, indicating the cell id number and whether the cell is using tdd (1) or fdd (0). after the cell has been detected the ofdm demodulator waits until subframe 0 of the next frame to start outputting the grid data, hence there is a gap between celldetected going high, and grid data being output as indicated by the griddatavalid signal. when griddatavalid is first asserted subframenum will be zero, and will increment for subsequent subframes. the simulation stops on the mibdetected or miberror signals being asserted.
once mib has been detected the ndlrb, phich, ng, nframe, and cellrefp signals all become active, indicating the key parameters of the cell. these parameters are displayed in the model, as they are static values when the simulation is stopped.
the following mib information is decoded when decoding the captured waveform:
ncellid (cell id): 76 tddmode (0 = fdd, 1 = tdd) : 0 ndlrb (number of downlink resource blocks): 25 phich (phich duration) index: 0 ng (hich group multiplier): 2 nframe (frame number): 262 cellrefp (cell-specific reference signals): 2
this indicates that the duplex mode used by the cell is fdd, the mib was decoded in frame number 262, the phich duration is 'normal' and the hich group multiplier value is 'one'.
hdl code generation and verification
to generate the hdl code for this example you must have an hdl coder™ license. use the makehdl
and makehdltb
commands to generate hdl code and hdl testbench for the hdl lte mib recovery subsystem. because the input waveform in this example contains at least 40 subframes to complete the cell search and mib recovery, test bench generation takes a long time.
the hdl lte mib recovery subsystem was synthesized on a xilinx® zynq®-7000 zc706 evaluation board. the post place and route resource utilization results are shown in the table below. the design met timing with a clock frequency of 140 mhz.
resource usage _______________ _____ slice registers 33348 slice luts 25630 ramb18 41 ramb36 37 dsp48 115
for more information see
references
3gpp ts 26.211 "physical channels and modulation"
3gpp ts 36.214 "physical layer"
3gpp ts 36.133 "requirements for support of radio resource management"