112
UPTEC F 17013 Examensarbete 30 hp Februari 2017 Wireless system design NB-IoT downlink simulator Douglas Troha Piotr Krasowski

Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Embed Size (px)

Citation preview

Page 1: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

UPTEC F 17013

Examensarbete 30 hpFebruari 2017

Wireless system designNB-IoT downlink simulator

Douglas TrohaPiotr Krasowski

Page 2: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Teknisk- naturvetenskaplig fakultet UTH-enheten Besöksadress: Ångströmlaboratoriet Lägerhyddsvägen 1 Hus 4, Plan 0 Postadress: Box 536 751 21 Uppsala Telefon: 018 – 471 30 03 Telefax: 018 – 471 30 00 Hemsida: http://www.teknat.uu.se/student

Abstract

Wireless system design: NB-IoT downlink simulator

Douglas Troha, Piotr Krasowski

The newly defined NB-IoT standard currently lacks a toolkit and simulator. In orderto develop algorithms for this new standard there is a need for channels and signals asreference during tests. MATLAB is commonly used for testing LTE signals andtherefore the toolkit was developed in this environment. The toolkit focuses primarilyon the Layer 1-relevant functionality of NB-IoT, the grid generation, encoding,rate-matching and modulation of channels. The simulator focuses on testing thedeveloped toolkit in a virtual LTE NB-IoT environment. The virtual environmentattempts to emulate a base station and a terminal. The path followed is scheduling,channel processing, grid generation, QPSK and OFDM modulation through a modeledchannel, OFDM demodulation, channel estimation, equalisation, QPSK demodulationand reversal of channel processing. The simulator tests primarily the NPDSCHchannel implementations. Measurements of bit error and block error rates weremade and it was concluded that they follow the expected trends. More testing isrequired to validate the remaining channels. A sector equaliser and an interpolatingequaliser were tested by measuring block error rate and checking constellationdiagrams and it was concluded that the performance of the interpolation equaliser ismore consistent. In order to improve the equalisation further the noise estimationmust be reworked.

ISSN: 1401-5757, UPTEC F** ***Examinator: Tomas NybergÄmnesgranskare: Mikael SternadHandledare: Magnus Midholt

Page 3: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Popularised summary

The internet of things (IoT) is the big move forward, connecting our everyday household

objects to the cloud. Most commonly the IoT devices make use of the local wireless inter-

net connections available and, similar to land-line phones, this greatly limits the mobility

of the user. The next big step came with cellular mobile connections, allowing users to

always be reachable on their phones (almost) anywhere they go. The current 4G mobile

systems make use of 3GPP Long Term Evolution (LTE) to reach higher throughput and

improve robustness. To give IoT devices the same mobility and connection quality as

enjoyed by today’s mobile phones 3GPP introduced the narrowband-IoT (NB-IoT) func-

tionality in LTE release 13. This new functionality employs a small subset of the current

LTE band to handle IoT-device traffic, allowing a greater number of connected units per

frequency band and the IoT devices to lower their power consumption.

Systems being developed for LTE commonly use MATLAB reference models to test the

implementations of certain functionality, and with the release of new functionality for

LTE, new models need to be established. This is the purpose of the thesis, using the

3GPP specifications to create new reference models for downlink algorithm testing. A

downlink system simulator is implemented in order to test the reference models.

The thesis discusses how the new or altered LTE channels and signals: narrowband

physical broadcast channel, narrowband physical downlink shared channel, narrowband

physical downlink control channel, narrowband reference signal, narrowband primary syn-

chronization signal, and narrowband secondary synchronization signal, are implemented

on both the base station and terminal, as well as how these signals are tied together with

scheduling in the system simulator.

Simulations measuring the bit error and block error rates and theoretical comparisons are

established in order to validate both the system-level and channel-level implementations.

The simulations indicate that the narrowband physical channel pathway is behaving as

expected, but further implementation of the error rates for the other channels is required

to validate both the narrowband physical broadcast channel and the narrowband physical

downlink control channel behaviors.

Page 4: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Contents

1 Abbreviations 1

2 Introduction 32.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.3 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.4 Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.5 Work distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Technical background 63.1 NB-IoT Frame structure . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.2 Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.3 Orthogonal frequency-division multiplexing . . . . . . . . . . . . . . . . . 83.4 Processing and coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.4.1 Cyclic redundancy coding . . . . . . . . . . . . . . . . . . . . . . 83.4.2 Tail-biting convolutional coding . . . . . . . . . . . . . . . . . . . 103.4.3 Rate matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.5 Signals and channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.5.1 Narrowband physical downlink shared channel . . . . . . . . . . . 133.5.2 Narrowband physical broadcast channel . . . . . . . . . . . . . . . 153.5.3 Narrowband physical downlink control channel . . . . . . . . . . . 163.5.4 Cell-specific reference signal . . . . . . . . . . . . . . . . . . . . . 183.5.5 Narrowband reference signal . . . . . . . . . . . . . . . . . . . . . 183.5.6 Narrowband primary synchronization signal . . . . . . . . . . . . 203.5.7 Narrowband secondary synchronization signal . . . . . . . . . . . 22

3.6 System information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.6.1 MasterInformationBlock-NB . . . . . . . . . . . . . . . . . . . . . 233.6.2 SystemInformationBlockType1-NB . . . . . . . . . . . . . . . . . 253.6.3 SystemInformationBlockTypeX-NB . . . . . . . . . . . . . . . . . 25

3.7 Downlink control information . . . . . . . . . . . . . . . . . . . . . . . . 273.7.1 Format N0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.7.2 Format N1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313.7.3 Format N2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

3.8 Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343.8.1 Gold sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343.8.2 Zadoff-Chu sequence . . . . . . . . . . . . . . . . . . . . . . . . . 353.8.3 Hadamard Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3.9 Error rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363.9.1 Block error ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . 363.9.2 Channel bit error rate . . . . . . . . . . . . . . . . . . . . . . . . 363.9.3 Post-equalization bit error rate . . . . . . . . . . . . . . . . . . . 37

4 Simulator design 384.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384.2 Main . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

4.2.1 Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Page 5: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

4.3 Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.3.1 Dsch-only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.3.2 Normal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

5 Channel scheduling 435.1 Control channel search spaces . . . . . . . . . . . . . . . . . . . . . . . . 43

5.1.1 Common search space type 1 - Paging . . . . . . . . . . . . . . . 435.1.2 Common search space type 2 - Random Access . . . . . . . . . . 455.1.3 User-specific search spaces . . . . . . . . . . . . . . . . . . . . . . 46

5.2 Narrowband physical broadcast channel . . . . . . . . . . . . . . . . . . . 475.3 Narrowband synchronization signals . . . . . . . . . . . . . . . . . . . . . 485.4 Narrowband physical downlink shared channel . . . . . . . . . . . . . . . 49

5.4.1 SystemInformationBlockType1-NB . . . . . . . . . . . . . . . . . 495.4.2 SystemInformationBlockTypeX-NB . . . . . . . . . . . . . . . . . 50

6 Base station-side processing 516.1 Channel processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

6.1.1 Narrowband physical downlink shared channel . . . . . . . . . . . 516.1.2 Narrowband physical broadcast channel . . . . . . . . . . . . . . . 516.1.3 Narrowband physical downlink control channel . . . . . . . . . . . 52

6.2 Radio frame generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526.2.1 Narrowband physical broadcast channel . . . . . . . . . . . . . . . 536.2.2 Narrowband physical downlink shared channel . . . . . . . . . . . 536.2.3 Narrowband physical downlink control channel . . . . . . . . . . . 546.2.4 Narrowband and cell-specific reference signals . . . . . . . . . . . 546.2.5 Narrowband primary synchronization signal . . . . . . . . . . . . 556.2.6 Narrowband secondary synchronization signal . . . . . . . . . . . 55

7 Signal OFDM and channel models 567.1 Orthogonal frequency-division multiplexing modulation and demodulation 56

7.1.1 Padding addition and removal . . . . . . . . . . . . . . . . . . . . 577.1.2 Fast Fourier transform and its inverse . . . . . . . . . . . . . . . . 577.1.3 Upsampling and downsampling . . . . . . . . . . . . . . . . . . . 577.1.4 Cyclic prefix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

7.2 Channel models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587.2.1 Static propagation . . . . . . . . . . . . . . . . . . . . . . . . . . 587.2.2 Multi-path fading propagation . . . . . . . . . . . . . . . . . . . . 587.2.3 High speed train condition . . . . . . . . . . . . . . . . . . . . . . 587.2.4 Custom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

8 Terminal-side processing 598.1 Channel estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598.2 Equalisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598.3 Signal decoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

8.3.1 Narrowband physical downlink shared channel . . . . . . . . . . . 618.3.2 Narrowband physical broadcast channel . . . . . . . . . . . . . . . 628.3.3 Narrowband physical downlink control channel . . . . . . . . . . . 62

Page 6: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

9 Results 639.1 Feasibility checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

9.1.1 Bit error rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639.1.2 Repetitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649.1.3 Channel comparison . . . . . . . . . . . . . . . . . . . . . . . . . 659.1.4 Narrowband reference signal mapping pattern . . . . . . . . . . . 66

9.2 Equaliser performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

10 Conclusion 74

11 Discussion 74

12 Further work 76

A Structures: iA.1 Config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iA.2 ControlDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iA.3 ElementTypeValues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iiiA.4 Enb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iiiA.5 FrameConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ivA.6 ScheInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ivA.7 ScheduledData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vA.8 NdcchConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viA.9 Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiA.10 UeStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

B Help: Functions viiiB.1 Simulation functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii

B.1.1 dschOnlySim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiiB.1.2 dschOnlyGen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiiB.1.3 mbltePathSelect . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

B.2 Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixB.3 Grid generation functions . . . . . . . . . . . . . . . . . . . . . . . . . . ix

B.3.1 mblteGenFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixB.3.2 mblteGenSubframe . . . . . . . . . . . . . . . . . . . . . . . . . . xB.3.3 Cell-specific Reference Signal . . . . . . . . . . . . . . . . . . . . xiB.3.4 Narrowband Reference Signal . . . . . . . . . . . . . . . . . . . . xiB.3.5 Narrowband Physical Broadcast Channel . . . . . . . . . . . . . . xiiB.3.6 Narrowband Physical Downlink Shared Channel . . . . . . . . . . xivB.3.7 Narrowband physical downlink control channel . . . . . . . . . . . xvB.3.8 Narrowband primary synchronization signal . . . . . . . . . . . . xviiB.3.9 Narrowband secondary synchronization signal . . . . . . . . . . . xix

B.4 Encoding and decoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxB.4.1 Broadcast channel . . . . . . . . . . . . . . . . . . . . . . . . . . xxB.4.2 Downlink shared channel . . . . . . . . . . . . . . . . . . . . . . . xxiB.4.3 Narrowband physical downlink control channel . . . . . . . . . . . xxiii

B.5 OFDM modulation and demodulation . . . . . . . . . . . . . . . . . . . . xxivB.6 Channel estimation and equalisation . . . . . . . . . . . . . . . . . . . . xxv

Page 7: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

B.6.1 mblteInterpolationEqualizer . . . . . . . . . . . . . . . . . . . . . xxv

C QPSK constellation diagrams xxvi

Page 8: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

1 Abbreviations

• 3GPP 3rd Generation Partnership Project

• AWGN Additive White Gaussian Noise

• BER Bit Error Rate

• BLER BLock Error Rate

• CBER Channel Bit Error Rate

• CCE Control Channel Element

• CP Cyclic Prefix

• CRC Cyclic Redundancy Code or Cyclic Redundancy Check

• CRS Cell-specific Reference Signal

• DCI Downlink Control Indicator

• EQ EQualiser

• FFT Fast Fourier Transform

• GUI Graphical User Interface

• IFFT Inverse Fast Fourier Transform

• IoT Internet of Things

• LSB Least-Significant Bit

• LTE Long-Term Evolution

• MIB Master Information Block

• MSB Most Significant Bit

• NB-IoT Narrowband Internet of Things

• NCCE Narrowband Control Channel Element

• NPBCH Narrowband Physical Broadcast Channel

• NPDCCH Narrowband Physical Downlink Control Channel

• NPDSCH Narrowband Physical Downlink Shared Channel

• NPRACH Narrowband Physical Random-Access Channel

• NPSS Narrowband Primary Synchronisation Signal

• NPUSCH Narrowband Physical Uplink Shared Channel

• NRS Narrowband Reference Signal

• NSSS Narrowband Secondary Synchronisation Signal

1

Page 9: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

• OFDM Orthogonal Frequency-Division Multiplexing

• PEQ-BER Post-EQualisation BER

• PF Paging Frame

• PSS Primary Synchronisation Signal

• QPSK Quadrature Phase-Shift Keying

• RE Resource Element

• RNTI Radio Network Temporary Identifier

• SFN System Frame Number

• SIB System Information Block

• SSS Secondary Synchronisation Signal

• TTI Transmission Time Interval

• UE User Equipment

• USS User-specific Search Space

• UTC Coordinated Universal Time (sic)

• WGN White Gaussian Noise, see AWGN

• Z-F Zero-Forcing

2

Page 10: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

2 Introduction

2.1 Background

We are moving more and more towards a ”smart” society, with electronic sensors andother devices transmitting small amounts of data being implemented in an ever increasingnumber of fields. A smoke detector could be alerting a ”smart” house system that in turncalls a smartphone with a warning, or temperature sensors inside cargo containers wouldmonitor if the perfect environment for the package is kept, creating an Internet of Things(IoT) together with similar devices. As the possibilities are almost endless, the numberof devices connected increases each day. Therefore 3rd Generation Partnership Project(3GPP), the organisation behind the Long Term Evolution (LTE) and LTE-Advancedtechnologies introduced a new path for these systems: the Narrowband Internet of Things(NB-IoT) that focuses on both flexibility of deployment and cost reduction.

NB-IoT’s design is based on LTE, allowing for use of an already existing infrastructure,through inband and guardband deployment by allocating narrow radio frequency band-widths of 200 kHz, or by stand-alone deployments replacing GSM. However, not all thefunctions of LTE are used by NB-IoT. This allows for lesser device complexity and thusdecreasing unit costs.

More than 52,5001 devices can be supported by a single base station. This high densityof devices per Hertz can result in an overall cost reduction for the operator, and animprovement to coverage compared to LTE can be achieved due to an ability to performwell in low quality channels.

2.2 Problem

Companies developing algorithms for use with LTE commonly use MATLAB referencemodels to verify and performance test their implementations. With the introductionof NB-IoT into release 13 of 3GPP LTE, new reference models must be established totest systems developed to meet this new standard. The aim of the thesis is thereforeto implement certain NB-IoT LTE downlink functionality by implementing a toolkit, avirtual base station using these toolkit functions to generate reference data, and virtualuser equipment to verify the generated channel models.

2.3 Purpose

As NB-IoT introduces several changes into how the system works an investigation andimplementation of data generation algorithms is needed in order to test user equipmentalgorithms. The purpose of developing the simulator is to both implement these newdata generation algorithms as MATLAB functions and to test that they are working asexpected on a virtual user equipment before using them in a real algorithm development

1[14]

3

Page 11: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

environment. They may also be used as a reference for performance tests of targethardware. These checks may decrease the time and amount of work required during thedevelopment process.

2.4 Delimiters

In order to limit the scope of the thesis a focus is made on implementing downlink-specificLayer 1 functions. This inferring that the primary focus is on creating time-frequencygrids, time-domain signals and correctly encoding the data. Lessening the importance ofthe data in the channel. Cell-search and bandscan algorithms will not be developed forthe virtual user equipment, however the signals used by these algorithms should be madeavailable. As the specifications developed by 3GPP are ongoing projects the thesis willfocus on version 13.2.0 of specifications documents.

2.5 Work distribution

Troha has focused on the core of the simulator, tying together the different parts of thesystem. The tasks include development of the simulator core (sec. 4), graphical userinterface, error rate tests (sec. 3.9), channel scheduling (sec. 5) and generation of thesubframes (sec. 3.1 and sec. 6.2 and functions labeled mblteXxxSubframe in the subsec-tions). Troha has also been responsible for generation of NPBCH (sec. 3.5.2 and 6.2.1),NPSS (sec. 3.5.6 and 6.2.5) and NSSS (sec. 3.5.7 and 6.2.6) as well as implementation ofthe QPSK modulator described in 3.2. These channels have necessitated an investigationinto the sequences and matrices discussed in sec. 3.8.2 and 3.8.3. Final responsibilityhas been to investigate the master information block and the system information blocks(sec. 3.6). The feasibility checks discussed in sec. 9.1 have also been carried out byTroha.

Krasowski on the other hand developed many of the parts that were tied together byTroha. They include channel creation and processing of NPDSCH (sec. 3.5.1 and 6.2.2)and NPDCCH (sec. 3.5.3 and 6.2.3), creating DCI (sec. 3.7 and 3.5.3) for NPDCCH,the reference signal mapping of CRS (sec. 3.5.4 and 6.2.4) and NRS (sec. 3.5.5 and6.2.4), generation of the NRS (sec. 3.5.5), and explanation of the Gold sequence (sec.3.8.1) used in the generation and scrambling of many of the aforementioned signals andchannels. Piotr focused also on the OFDM encoding and decoding (sec. 3.3, 7.1, and8.3) of the signals, that is padding addition/removal (sec. 7.1.1), IFFT/FFT (sec. 7.1.2),upsampling/downsampling (sec. 7.1.3), and cyclic prefix addition/removal (sec. 7.1.4).Another part developed by Krasowski was channel encoding and decoding, includingCRC addition/removal (sec. 3.4.1), convolutional encoding/decoding (sec. 3.4.2), andrate matching/de-rate matching (sec. 3.4.3). The different channel models (sec. 7.2) werealso implemented by Krasowski, as well as channel estimation (sec. 8.1) and equalisation(sec. 8.2).

A responsibility overview is given in table 2.1

4

Page 12: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Table 2.1: Responsibilities of thesis authors

Area Responsible

NPBCH Troha

NPDCCH Krasowski

NPDSCH Krasowski

NPSS Troha

NSSS Troha

NRS Krasowski

OFDM Krasowski

QPSK Troha

Channel models Krasowski

Physical channel coding Krasowski

Channel estimation Krasowski

Equalisation Krasowski

Error rates Troha

Simulator Troha

Scheduling Troha

Information blocks Troha

User interface Troha

5

Page 13: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

3 Technical background

3.1 NB-IoT Frame structure

At the core of an LTE system is the time-frequency resource grid as can be seen atthe bottom of figure 3.1. In the resource grid the frequency component of the resourceis denoted a subcarrier. The subcarriers are evenly spaced individual signals in thefrequency domain. The time component in the resource grid is denoted an orthogonalfrequency division multiplexing (OFDM) symbol. Each of these symbols have a fixedlength transmission time. Each element of the grid is called a resource element (RE) andis labeled by their location in the time-frequency grid by (k,l) where k is the subcarriernumber and l is the OFDM symbol number. The NB-IoT downlink uses 12 subcarriersand 14 OFDM symbols per subframe. 7 of these symbols make a slot and each slot lastsfor 0.5 ms. Within a subframe each OFDM symbol is denoted by a number in the range0 to 13. 10 of these subframes create what is called a radio frame. The radio framenumber is called the system frame number (SFN) and is counted from 0 to 1023. Whenthe SFN counter overflows the counter is reset to 0 and the so called hyper SFN counteris increased. The hyper SFN ranges between 0 and 1023. Within each radio frame thesubframes are labeled as 0 to 9 and the slots as 0 to 19.

Radio frame - 10ms

Subframes – 1 ms

Slot – 0.5 ms

12

su

bca

rrie

rs –

1 R

eso

urc

e B

lock

Resource element (k,l)

14 ODFM symbols – 1 ms

Figure 3.1: Overview of the frame structuring for the NB-IoT downlink. Each radioframe consists of 10 subframes, and each subframe consists of 12 subcarriers and 14OFDM symbols.

Comparing to the notation for a normal LTE system a block of 12 subcarriers and 2 slots

6

Page 14: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

is called a resource block (RB). The NB-IoT downlink therefore uses 1 RB and in contrastto a normal LTE system that (depending on bandwidth) uses between 6 and 100 RBs,the frequency allocation necessary is quite small.

3.2 Modulation

NB-IoT uses a 2 stage modulation scheme where data is modulated with quadraturephase-shift keying and then uses orthogonal frequency-division multiplexing for base-bandmodulation. For quadrature phase-shift keying (QPSK) all the information is encodedinto the phase of the transmitted signal. QPSK modulation takes 2 input bits and mapsthem into one complex number I+jQ according the signal constellations defined in table3.1. These constellations points are visualized as a constellation diagram in figure 3.2.[2]

Table 3.1: QPSK signal constellation points for NB-IoT where I is the In-phase com-ponent and Q is the Quadrature component.

b(i),b(i+1) I Q

00 1√2

1√2

01 1√2− 1√

2

10 − 1√2

1√2

11 − 1√2− 1√

2

-0.6 -0.4 -0.2 0 0.2 0.4 0.6

In-Phase

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

Qu

ad

ratu

re

QPSK constellation

Figure 3.2: The QPSK constellation points used in NB-IoT LTE.

7

Page 15: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

3.3 Orthogonal frequency-division multiplexing

Orthogonal frequency-division multiplexing is a method of encoding data onto a signalusing a group of frequency spectra called subcarriers that are mutually orthogonal withinthe group over time. Their spacing is set at ∆f = 15 kHz in NB-IoT and together with aset number of the subcarriers (12) this gives a transmission bandwidth of 180 kHz. Whenthe timing requirements are added, the result is a time-frequency grid that can be seenin figure 3.1.

Another parameter of the OFDM is the cyclic prefix (CP). It is simply the ending of theOFDM symbol copied and pasted in front of the signal for additional protection fromintersymbol interference. NB-IoT uses the normal CP length TCP ≈ 4.7 µs for a allsymbols except the first one in each slot, that has a CP TCP ≈ 5.1 µs. This gives us anOFDM symbol time T = 1/∆f + TCP ≈ 71.4 µs or 71.8 µs respectively.

The OFDM symbols are also subject to channel encoding in order to better prepare themfor disturbances that may arise during the transmission.[8, ch. 3]

3.4 Processing and coding

The reason to encode data before transmission is to add protection from corruption bytransforming it using different codes and decoding them after reception. These mayminimise the impact of noise and channel fading that could make the data unsalvageable.This section describes also the processing done before and after coding, with the first stepbeing the addition of parity bits during the cyclic redundancy coding, followed by thetail-biting convolutional coding, where a codeword is created from data and later decodedusing an implementation of the Viterbi algorithm, and ending the processing with ratematching to the length of signal wanted.

3.4.1 Cyclic redundancy coding

Cyclic Redundancy Coding (CRC) is the first step performed during the encoding process.It is employed to detect random errors during data transfer. First a polynomial of aspecified length, as can be seen in table 3.2, is used as a divisor starting from the most-significant bit side and moving down the number until a rest is obtained after the lastdivision. This reminder is then concatenated to the end of the data symbol as redundantdata, i.e. just adding length and not new information to the data, forming a codeword.An example of CRC addition can be seen in figure 3.3.[3, sec. 5.1.1]

The codeword has to be decoded after being received. A CRC decode function uses thesame pre-specified polynomial as during the encoding and does the same operation asthe encoder, although this time on the codeword including the concatenated reminder.Therefore the division should yield a reminder of zero, marking that no errors could bedetected, with any other value implying change in data during transmission. For anexample of CRC check see figure 3.4.[13]

8

Page 16: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Table 3.2: Polynomials used in CRC in LTE-Advanced or NB-IoT. The lengths of theparity bits are the numbers in a given type, i.e. 24, 16 or 8 bits.

Type Generator polynomial

24A D24 +D23 +D18 +D17 +D14 +D11 +D10 +D7 +D6 +D5 +D4 +D3 +D + 1

24B D24 +D23 +D6 +D5 +D + 1

16 D16 +D12 +D5 + 1

8 D8 +D7 +D4 +D3 +D + 1

101100100111101101

10110010011110 000110101100010011110 000 110100001010011110 000 110100000111011110 000 110100000001111110 000 110100000000010110 000 110100000000001100 000 110100000000000001 000 1 10100000000000000 101

10110010011110101

14 bits data.Divisor polynomial.

Concatenate 3 zeros at the end for CRC.Polynomial division (XOR) with the dividend below.Divisor right-shifted to the nearest 1.

As the dividend is zero the algorithm stops,resulting in parity bits 101.

17-bit codeword with CRC.

Figure 3.3: CRC addition to 14 bits of data. Length of the CRC is three bits andthe divisor polynomial is x3 + x2 + 1, which in binary form is 1101. First a number ofzeros equal to the CRC length is added to the data. Then polynomial division is donerepeatedly until the dividend of the data is zero, with the reminder becoming parity bits.

9

Page 17: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

101100100111101011101

10110010011110101110101100010011110101 110100001010011110101 110100000111011110101 110100000001111110101 110100000000010110101 110100000000001100101 110100000000000001101 110100000000000000000

17-bit codeword with CRC.Divisor polynomial.

Polynomial division (XOR) with the dividend below.Divisor right-shifted to the nearest 1.

As the dividend is zero the algorithm stops.

Figure 3.4: CRC check process. A 17 bit codeword is divided repeatedly with thedivisor polynomial x3 + x2 + 1, or 1101 in binary form. The dividend yielded is zero,therefore there were no errors during the transmission. If the result had been anythingelse, the check would flag that errors have occurred.

3.4.2 Tail-biting convolutional coding

Transmission errors can be minimised by the use of convolutional codes. A code isgenerated based on data to be transferred. Only the parity bits are then sent over thechannel and decoded at the receiver instead of data with the parity bits, as was the casewith the CRC (see section 3.4.1).

The parity bits are calculated by the use of a sliding window, or constraint length, ofa given size of kK bits, moving k bits after each calculation, and addition of the datawithin the window. Which bits are to be added together depends on the parity equationschosen. The parity equations can be written as a convolution of the window and agenerator function, giving the code its name. After K stages of such parity calculationsa codeword of length n bits is formed at a code rate of k/n.

This process can be illustrated in a number of ways, for example as a block diagram(figure 3.5), a state diagram (example in figure 3.6, or as a trellis diagram. The last oneis especially useful as it can be used in decoding the message. A trellis is a tree diagramthat expands the state diagram to all the state changes over time, not just one cycle, ascan be seen in an example in figure 3.7.

A software implementation of the Viterbi decoder is used in this project to decode thecodewords. Viterbi circumvents the trellis by the use of path metric, keeping track of themost probable path through the trellis so far (least bit error rate), and branch metric,i.e. metrics for choosing a given path forward. The lowest sum of past path metric andall the branch metrics is chosen, the so-called survivor path. After calculating the most

10

Page 18: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

likely path through the whole codeword the original data can be extracted by followingthe branches picked backwards.[10]

Figure 3.5: Block diagram of a convolutional code. A codeword of length n is createdby the use of K different stages of length k combined using addition of different elementsfrom possibly all the stages.

Figure 3.6: State diagram of a convolutional code with n = 3, k = 1 and K = 3. Onebit at a time is shifted in at each stage, with the process repeating itself after all thestages. The output codeword is C1C2C3, where C1 = S1 + S2 + S3, C2 = S2 + S3, andC3 = S1 + S3. When the last stage is also the first stage in a new cycle then the code isso-called tail-biting.

11

Page 19: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Figure 3.7: Trellis diagram with grey arrows showing all the different paths that mightbe taken at each time. At each point the uppermost arrow moving away from it denotesinput S1 = 0 and the bottom arrow S1 = 1. The black arrows show the path takengiven the input S1 above the diagram and the numbers next to them show the paritybits calculates as in the example with the states in figure 3.6. For example starting atS2S3 = 00 at t0 we shift in S1 = 1. This gives us parity bits C1 = S1 + S2 + S3 = 1,C2 = S2 + S3 = 0, and C3 = S1 + S3 = 1, resulting in 101.

3.4.3 Rate matching

Rate matching is used to fit the coded data into a transport block of a given size. Itconsists of three steps: sub-block interleaving, bit collection, and bit selection. Sub-blockinterleaving rearranges and spreads out the input in order to mitigate the worst effectsof channel fading, which occurs in bursts. Bits are then collected by combining theinterleaved data streams, first the systematic bits and then alternating first and secondparity bits, to create a circular buffer. Afterwards bits are selected consecutively fromthe buffer until the output reaches the wanted length. At the receiver side the aboveoperations are performed with their inverses as to recover the original rate.[8][10]

3.5 Signals and channels

NB-IoT uses many of the concepts of the normal LTE system, including its generalapproach to channels and signals. However, compared to the ordinary LTE system theNB-IoT system is a very stripped-down version. As can be seen in table 3.3 NB-IoT uses3 downlink channels compared to normal LTE downlink that uses 8. The same appliesto the signals. There is only a single reference signal on the downlink compared to 6reference signals in LTE. In table 3.3 there is a full comparison between the two systems,the original LTE channel or signal under the LTE columns and the corresponding NB-IoTversion under the NB-IoT columns.

12

Page 20: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Table 3.3: The table shows the available channels and signals in normal LTE and thecorresponding NB-IoT versions of those channels and signals.[2]

Channels: Channels: Signals: Signals:

LTE NB-IoT LTE NB-IoT

PDSCH NPDSCH CRS NRS

PBCH NPBCH PSS NPSS

PDCCH NPDCCH SSS NSSS

PMCH N/A PRS N/A

PCFICH N/A DM-RS N/A

PHICH N/A CSI-RS N/A

EPDCCH N/A Discovery N/A

MPDCCH N/A MBSFN reference N/A

UE-specific DM-RS N/A

3.5.1 Narrowband physical downlink shared channel

The Narrowband Physical Downlink Shared Channel (NPDSCH) is used in the physicallayer to carry data indicated by the downlink control information carried by the controlchannel. This data is scrambled for each codeword q in a subframe into

b(q)scrambled(i) = (b(q)(i) + c(q)(i))mod(2), [2, sec. 10.2.3.1] (3.1)

where b(q) is the bit sequence of data to be scrambled and c(q) is the pseudo-randomsequence described in section 3.8.1, there represented by c(n). The sequence is initialisedwith the sum

cinit = nRNTI · 214 + nfmod(2) · 213 + bns/2c · 29 +NNcellID , [2, sec. 10.2.3.1] (3.2)

with nRNTI being radio network temporary identifier number, nf the frame number, nsthe first slot to be transmitted, and NNcell

ID the cell ID. The scrambled bits are thenmodulated using QPSK.

If NPDSCH is to be repeated the scrambling should be remade anew after everymin(MNPDSCH

rep , 4) scheduled repetitions in case that the BCCH is not being carried, orafter every repetition if it is.

Afterwards the modulated data is mapped onto resource elements over a number ofsubframes NSF depending on the transport block size (TBS) carried by the downlinkcontrol information found in section 3.7.2, and then repeated MNPDSCH

rep − 1 times.

The resource elements k, subcarrier number, and l, symbol number, used on each antennaport, have to fulfill all of the following:

• in the first slot of a subframe l ≥ lDataStart, with lDataStart being given by higherlayer parameter eutraControlRegionSize if operationModeInfo is set to ’00’ or ’01’,

13

Page 21: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

meaning inband deployment, otherwise lDataStart being 0,

• they are not used for carrying CRS or NRS, and

• the subframe itself is not carrying NPBCH, NPSS, or NSSS, see figure 3.8.

Figure 3.8: Subframe candidates to carry NPDSCH or NPDCCH are marked in green,being subframes 1-4 and 6-8, the purple subframe 9 being eligible only if NSSS is notpresent in the frame. The exact subframes used however are set by scheduling.

The resource elements chosen in accordance to the rules above in a slot are then filled withthe modulated data, starting with the first symbol l and filling it in an increasing order ofk, and then repeating the same process for the next symbol and so on. If after finishing aslot there is still data to be transmitted then the second slot will be filled in similar way,then a new subframe in case of data stretching over several subframes, until every pieceof data is bound to a resource element. However, in the case of subframe repetitionswithout carrying the BCCH, a finished subframe is repeated min(MNPDSCH

rep , 4) timesbefore the placement of data continues. The mapping continues until transmission ofa total of MNPDSCH

rep · NSF subframes. If BCCH is carried, the data is placed in NSF

subframes before being repeated for MNPDSCHrep NSF − 1 subframes.

When BCCH is not carried, a gap in transmission of NPDSCH can be achieved by ahigher layer using transmission gap parameter dlGap-Threshold of value Ngap,threshold. Ifthe maximum number of repetitions is Rmax and Rmax < Ngap,threshold then there are nogaps. Otherwise the start of the gap in terms of frame and subframe numbers is foundusing (10nf + bns/2c)modNgap,period = 0. Ngap,period is obtained from higher levels bythe means of parameter dlGap-Periodicity. Another parameter, dlGap-DurationCoeff,gives the value of Ngap,coeff , used in calculating the gap duration in number of subframesNgap,duration = Ngap,coeffNgap,period. An example of transmission gaps can be seen in figure3.9.

NPDSCH is to be transmitted exclusively on NB-IoT downlink subframes, being post-poned if need arises. An exception is SystemInformationBlockType1-NB (see section3.6.2) transmitted in subframe 4.[2, sec. 10.2.3]

Figure 3.9: An example of a transmission gap in data stretching over three subframes,with subframes 1-4 and 6-8 being eligible for NPDSCH. The gap start nf points to thecurrent frame and ns to subframe 2. Ngap,duration is calculated to be four. One subframeof data is scheduled in subframe 1, then the gap starts at subframe 2 and lasts for foursubframes. Subframe 5 is not eligible for NPDSCH transmission and therefore ignored.The data transmission continues at subframe 7 and ends at subframe 8.

14

Page 22: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

3.5.2 Narrowband physical broadcast channel

The Narrowband Physical Broadcast Channel (NPBCH) carries vital system information,the MasterInformationBlock. The information block is first concatenated with a 16 bitCRC block (as described in section 3.4.1) and then scrambled according to the equation[2,sec. 10.2.4.1]:

b(i)scrambled = (b(i) + c(i))mod(2), (3.3)

where c(i) is the i:th element of the sequence described in section 3.8.1 initialized withcinit = NNcell

ID , and b(i) are the unscrambled bits. The scrambled bits b(i)scrambled are thenmodulated with QPSK as described in section 3.2.

The modulated bits are then mapped in sequence first along k (subcarriers) and then alongl (symbols) while not using the first 3 symbols nor the elements used by the narrowbandreferece signal or cell-specific reference signals. An example NPBCH subframe mappingis shown in figure 3.10 Once a subframe has been mapped, the subframe is repeated 7times before the mapping is continued.

NPBCH subframe

0 2 4 6 8 10 12

11

9

7

5

3

1 Empty

NPBCH

NRS

NRS

CRS

Figure 3.10: Example narrowband broadcast channel resource element allocation withina subframe for an inband deployment.

0 1 2 3 4 5 6 7 8 9

NPBCH

0 1 2

NPBCH

nf mod 64 = 1Starting frame: nf mod 64 = 0

Figure 3.11: NPBCH subframe placement within a radio frame. NPBCH always occu-pies the first subframe within every radio frame, and the starting frame for a NPBCHtransmission is given by nfmod64 = 0

As shown in figure 3.11, NPBCH is transmitted in subframe 0. It is transmitted in64 consecutive frames, and it starts in frames fulfilling nfmod(64) = 0.[2, sec. 10.2.4].The starting frame begins where the previous transmission ends, meaning that there willalways be a NPBCH subframe present in every radio frame.

15

Page 23: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

3.5.3 Narrowband physical downlink control channel

The Narrowband Physical Downlink Control Channel (NPDCCH) is used to carry down-link control information explained is section 3.7. This information is carried over one oran aggregation of two following Narrowband Control Channel Elements (NCCEs) withina subframe, depending on the NPDCCH format chosen, as seen in table 3.4. Each oneof them consists of six consecutive subcarriers in a subframe, with NCCE0 being placedon subcarriers 0-5 and NCCE1 6-11, as seen in figure 3.12. It is possible for two format0 NPDCCHs to be transmitted within the same subframe.

Table 3.4: NPDCCH formats and corresponding number of aggregated NCCEs.

NPDCCH format Number of NCCEs

0 1

1 2

Figure 3.12: NCCE distribution over the subcarriers in a NPDCCH subframe. Anyslots not meant to carry NPDCCH are flagged by a higher level signal.

The control information carried is scrambled using formula

bscrambled(i) = (b(i) + c(i))mod2, [2, sec. 10.2.5.2] (3.4)

where b(i) is the ith element of the bit sequence of data to be scrambled, and c(i) is theith element of the pseudo-random sequence described in section 3.8.1, there representedby c(n). The sequence is initialised at the start of the search space and every fourthNPDCCH subframe with

cinit = bns/2c · 29 +NNcellID , [2, sec. 10.2.5.2] (3.5)

16

Page 24: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

where ns is the first slot to be transmitted after initialising the scrambling sequence, andNNcellID is the cell ID. The scrambled bits are then modulated using QPSK.

Resource elements that make up the control channel on a single antenna port are chosenusing the following rules:

• the subframe does not carry NPBCH, NPSS, or NSSS (see figure 3.8),

• they belong to the NCCE chosen (see figure 3.12),

• they are not used for carrying PBCH, PSS, SSS, CRS or NRS (see figure 3.13), and

• in the first slot of a subframe l ≥ lNPDCCHStart, with lNPDCCHStart being given byhigher layer parameter eutraControlRegionSize if operationModeInfo is set to ’00’ or’01’, meaning inband deployment, otherwise lNPDCCHStart being 0 (see figure 3.13),

The resource elements chosen in accordance to the rules above in a slot are then filledwith the modulated data, starting with the first symbol l and filling it in an increasingorder of subcarriers k, and then repeating the same process for the next symbol and soon for the whole subframe until there is nothing more to map.

Like NPDSCH in section 3.5.1 transmission gaps can be scheduled for NPDCCH usingthe same configuration.

NPDCCH is to be transmitted exclusively on NB-IoT downlink subframes, being post-poned if need arises.[2, sec. 10.2.5]

Figure 3.13: An example of a NPDCCH subframe. Both NCCE0 and NCCE1 are tobe transmitted. It is an inband deployment and the starting slot is set to 3 by a higherlevel signal, therefore the first three slots are not to be used by the NPDCCH. The tworeference signals CRS (LTE) and NRS (NB-IoT) are also present and not used by theNPDCCH. The remaining resource elements are divided between the two NCCEs.

17

Page 25: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

3.5.4 Cell-specific reference signal

The Cell-specific Reference Signal (CRS) is an LTE signal present in subframes duringin-band deployment. It can be transmitted on up to four antenna ports p 0 through 3. Itis mapped to resource elements (k, l) in a subframe with k standing for subcarrier number(with 0 being the first subcarrier), and l standing for symbol within the slot (also startingat 0). The formula for mapping is

a(p)k,l = rl,ns(m

′), [2, sec. 6.10.1.2] (3.6)

with ns being the slot number, and

k = 6m+ (v + vshift)mod6,

m′ = m+Nmax,DLRB −NDL

RB ,

m = 0, 1, ..., 2 ·NDLRB − 1,

l =

{0, NDLsymb − 3} if p ∈ {0, 1},

1 if p ∈ {2, 3},

vshift = N cellID mod6,

v =

0 if p = 0 and l = 0,

3 if p = 0 and l 6= 0,

3 if p = 1 and l = 0,

0 if p = 1 and l 6= 0,

3(nsmod(2)) if p = 2,

3 + 3(nsmod(2)) if p = 2,

where NDLRB is bandwidth configuration for downlink in multiples of number of subcarriers,

Nmax,DLRB being its largest value, NDL

symb is the number of OFDM symbols in one downlink

slot, and N cellID is the cell ID. Any resource elements reserved for the transmission of the

CRS on any of the ports are not to be used by other signals or channels and should beset to 0, except for the elements carrying the CRS on the current antenna port.[2, sec.6.10.1.2]

3.5.5 Narrowband reference signal

The Narrowband Reference Signal (NRS) is a signal used for estimating the channel andcorrecting the received signal accordingly. It is therefore deployed in subframes containingeither one of shared or control channels. The transmitted NRS can be calculated by thereceiver from the values supplied by the synchronisation signals described later in sections3.5.6 and 3.5.7.

18

Page 26: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

NRS is generated using the sequence:

rl,nS(m) =1√2

(1− 2 · c(2m)

)+ j

1√2

(1− 2 · c(2m+ 1)

), [2, sec. 10.2.6.2] (3.7)

m = 0, 1, ..., 2Nmax,DLRB − 1, (3.8)

where l is the symbol number within the slot of number ns, Nmax,DLRB is largest bandwidth

configuration for downlink in multiples of number of subcarriers, set to 110 for legacyLTE, and c(i) is the ith element of the pseudo-random sequence found in section 3.8.1.The sequence is initiated at the beginning of each OFDM symbol with:

cinit = 210 ·(7 · (n′s + 1) + l+ 1

)· (2 ·NNcell

ID + 1) + 2 ·NNcellID +NCP , [2, sec. 10.2.6.1] (3.9)

where NCP = 1, as only normal CP is used in NB-IoT, and

n′s =

10bns/10c+ nsmod(2) for frame structure type 3,

ns otherwise.

The transmission of the NRS can be set to either a single antenna port or a couple. Whichports are used is controlled by operationModeInfo, a higher layer parameter. If it’s setto ’00’ the ports to be used are 0 and 1, otherwise ports 1000 and 1001 are used.

NRS occupies different resource elements within a subframe. To find their position withina subframe grid, with k standing for a subcarrier number (with 0 being the first subcar-rier), and l, standing for symbol within the slot (also starting at 0). The formula formapping is:

a(p)k,l = rl,ns(m

′), [2, sec. 10.2.6.2] (3.10)

with p being the current antenna port, ns the slot number, and

k = 6m+ (v + vshift)mod(6),

m′ = m+Nmax,DLRB − 1,

m = {0, 1},

l = {NDLsymb − 2, NDL

symb − 1},

vshift = NNcellID mod(6),

v =

0 if p ∈ {0, 1000} and l = NDL

symb − 2,

3 if p ∈ {0, 1000} and l = NDLsymb − 1,

3 if p ∈ {1, 1001} and l = NDLsymb − 2,

0 if p ∈ {1, 1001} and l = NDLsymb − 1,

where Nmax,DLRB is as in equation 3.7, NDL

symb is the number of OFDM symbols in one

downlink slot, and NNcellID is the narrowband cell ID. The two values of m and l mean

19

Page 27: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

that a total of four resource elements per slot, or eight per subframe, will be dedicatedto NRS on the given antenna port. However, the eight resource elements used for NRStransmission on the other port are reserved on the first one, and vice versa. A samplesubframe with the NRS can be seen in figure 3.14 for one antenna port, and in figure 3.15if two ports are used.[2, sec. 10.2.6]

Figure 3.14: Elements occupied by NRS in one antenna port case and with operation-ModeInfo set to ’00’. The thick black line in the middle separates the two slots.

Figure 3.15: Elements occupied by NRS in two antenna ports case and with operation-ModeInfo set to ’00’, marked with red and blue. The resource elements in grey are meantto be set to zero, as they are used for NRS transmission on the other port. The thickblack lines in the middle separate slots within a subframe.

3.5.6 Narrowband primary synchronization signal

The Narrowband primary synchronization signal (NPSS) is used to find a NB-IoT deploy-ment and roughly align in time with the base station. The NPSS signal consists of a 11

20

Page 28: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

contiguous OFDM symbols regardless of the type of deployment. In each of the symbols,11 of the 12 resource elements are used to for NPSS sequence. The NPSS sequence isgenerated by the frequency domain Zadoff-Chu in equation [2, sec. 10.2.7.1.1]:

dl(n) = S(l) · e−jπun(n+1)

11 (3.11)

where the root sequence index u = 5 and S(l) is a symbol mask with values defined intable 3.5

Table 3.5: Symbol masking values used in the NPSS sequence generation[2, sec.10.2.7.1.1].

Symbol 3 4 5 6 7 8 9 10 11 12 13

S(l) 1 1 1 1 -1 -1 1 1 1 -1 1

When mapping the elements dl to the resource grid you map along the increasing indicesk (subcarriers) from 0 to NRB

sc − 2, where NRBsc is the number of subcarriers per resource

block (12 in NB-IoT), and then increasing the indices l (symbols) from 3 to NDLsymb − 1,

where NDLsymb is the symbols per subframe in the NB-IoT downlink (14 in NB-IoT). If

NB-IoT is deployed inband and the mapped resource element is used for transmittingthe Cell-specific reference signal, the NPSS resource element dl is simply discarded. Theresult after mapping should be similiar to that of figure 3.16, with the CRS allocationsshifted or not present.

NPSS subframe

0 2 4 6 8 10 12

119 7 5 3 1 Empty

NPSS

CRS

Figure 3.16: Example narrowband primary synchronization signal resource elementallocation within a subframe for an inband deployment.

The placement of the NPSS subframe can be seen in figure 3.17, NPSS is always trans-mitted in subframe 5 of every radio frame.

21

Page 29: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

0 1 2 3 4 5 6 7 8 9

NPSS

Figure 3.17: The narrowband primary synchronization signal placement within a radioframe. The signal will always be allocated subframe 5 every radioframe.

3.5.7 Narrowband secondary synchronization signal

The Narrowband secondary synchronization signal (NSSS) is used to obtain the physicalcell ID of the deployment. The signal is also used to obtain information about thesystem frame timing. The NSSS consists of 11 contiguous OFDM symbols regardless ofthe deployment type. The full bandwidth (12 subcarriers) are used to allocate the NSSSsequence. The NSSS sequence is generated by a frequency domain Zadoff-Chu wherethe root sequence index u is dependent on the physical cell ID as in the equation[2, sec.10.2.7.2.1]:

u = NNcellID mod(126) + 3 (3.12)

where NNcellID is the narrowband physical cell ID of the deployment. The full sequence is

given by the equation [2, sec. 10.2.7.2.1]:

d(n) = bq(m)e−j2πθfne−jπun′(n′+1)

131 (3.13)

where n = 0, 1, ..., 131, n′ = nmod(131), m = nmod(128) and q = bNNcellID

126c. Equation 3.13

consists of 3 terms. The term bq(m) is a binary mask used to determine the range of thecell identity. There are 4 different masks generated from a length 128 Hadamard matrix.Each mask corresponds to one of the ranges 0:126, 126:252, 252:378 or 378:504.

The term e−j2πθfn, where θf = 33132

(nf/2)mod4, introduces a cyclic shift to the sequence,this shift is used to provide the user equipment with a rough time alignment within a80ms cycle.

The term e−jπun′(n′+1)

131 is the Zadoff-Chu term that determines the cell identity within therange given by the bq(m) term.

When mapping the elements dl to the resource grid you map along the increasing indicesk (subcarriers) from 0 to NRB

sc − 1, where NRBsc is the number of subcarriers per resource

block (12 in NB-IoT), and then increasing the indices l (symbols) from 3 to NDLsymb − 1,

where NDLsymb is the symbols per subframe in the NB-IoT downlink (14 in NB-IoT). If

NB-IoT is deployed inband and the mapped resource element is used for transmitting theCell-specific reference signal, the NSSS resource element d(n) is simply discarded. Theresult after mapping should be similar to that of figure 3.18, with the CRS allocationsshifted or not present.

22

Page 30: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

NSSS subframe

0 2 4 6 8 10 12

119 7 5 3 1 Empty

NSSS

CRS

Figure 3.18: Example narrowband secondary synchronization signal resource elementallocation within a subframe for an inband deployment.

As shown in figure 3.19, NSSS is transmitted in subframe 9 of every other frame (nfmod(2) =0, where nf is the system frame number).

0 1 2 3 4 5 6 7 8 9

0 1 2 3 4 5 6 7 8 9

0 1 2 3 4 5 6 7 8 9

NSSS

NSSS

Frame (nf +2) mod 2 = 0

Frame nf mod 2 = 0

Frame (nf +1) mod 2 = 1

Figure 3.19: The narrowband secondary synchronization signal placement within aradio frame. The signal will be allocated subframe 9 on every other radioframe.

3.6 System information

3.6.1 MasterInformationBlock-NB

The master information block (MIB) is a transport block containing the most essentialsystem information needed to decode other system information blocks. MIB is a rela-tively short system message (34 bits) that is sent over the narrowband physical broadcastchannel. The information transmitted in the MIB is visualized in figure 3.20.

23

Page 31: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

systemFrameNumber-MSB schedulingInfoSIB1 ab-Enabled spare

hyperSFN-LSB systemInfoValueTag operationModeInfo

Figure 3.20: MasterInformationBlock-NB represented as a sequence of blocks, eachblock denotes a single bit in the sequence. The individual sequence names are listedon top for the bits marked in black, while bits marked in blue have their names listedbelow.[6]

The systemFrameNumber-MSB is explicitly available in the MIB while the 6 LSB areimplicitly acquired by decoding the MIB. The hyperSFN-LSB field is a basic over-flow counter for the 10-bit systemFrameNumber. The schedulingInfoSIB1 field de-fines the number of repetitions and the transport block size used for transmitting theSystemInformationBlocktype1-NB. The systemInfoValueTag is a parameter that trackschanges in system information other than the MIB, SystemInformationBlocktype-14(SIB14) and SIB16. If a change of the systemInfoValueTag is detected when decodingthe MIB system information must be reacquired. The ab-Enabled parameter is a simplelogical that defines if a UE is allowed to make a connection attempt or if it has to waituntil a change to the system parameters occurs. If the user equipment is barred fromaccessing the cell by this parameter, it must wait to receive SIB14 before making anyattempts to connect. OperationModeInfo is the parameter that determines the type ofdeployment. The meaning of the full 7 bit sequence varies depending on the first 2 bitsof the sequence. The first 2 bits define the deployment type, while the last 5 bits dependon the specific value of the deployment type bits, refer to table 3.6 for parameter namesfor the last 5 bits. [6]

Table 3.6: The first 2 bits of the operationModeInfo parameter defines the deploymenttype, where the values 00 and 01 denote the inband deployments, 00 uses the samephysical cell identity (PCI) as the main LTE deployment, while 01 uses a different PCIfrom the main LTE deployment. 10 defines the guardband type deployment meaningthat it is placed at the very edge of a LTE deployment. 11 is the standalone deploymentthat is completely independent from any other LTE deployment.

operationModeInfo Bits Param(bits) Param(bits) Param(bits)

Inband-SamePCI 00 eutra-CRS-SequenceInfo(5)

Inband-DifferentPCI 01 eutra-NumCRS-Ports(1) rasterOffset(2) spare(2)

Guardband 10 rasterOffset(2) spare(3)

Standalone 11 spare(5)

To ensure successful delivery to the user equipment (UE) the MIB is greatly overcodedinto 8 self-decodable blocks, where each block spans 1600 bits (or 800 Resource elements).

24

Page 32: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

The blocks are then transmitted one at a time in subframe 0 of each radio frame for 8consecutive frames. This allows a softcombining during a relatively short period (80 ms)for the user equipment to acquire the MIB. The next block is then transmitted during thefollowing 80 ms still containing the same information, but scrambled slightly differently.If the UE fails to decode the MIB during the first repeat, an attempt is made to decodethe next repeat and so on. After the 640 ms transmission time interval the MIB isupdated and 8 new self-decodable blocks are created and the process is repeated.[3, sec.6.4.1]

3.6.2 SystemInformationBlockType1-NB

SystemInformationBlockType1-NB (SIB1) carries scheduling information for the systeminformation messages and parameters needed to check if a connection to the cell is allowed.The parameters that are always included in the SIB1 message are shown in table 3.7, butthere are many additional parameters that may be included in the message. [6] The SIB1message stands to be vital because it both informs the user equipment if a connection canbe made, and how to locate the other system information blocks of which for examplecontain the information necessary to make a random access attempt.

Table 3.7: The parameters in SystemInformationBlockType-1 that always are trans-mitted in the message. There are several optional or conditional additional parametersthat may be included.

SystemInformationBlockType1-NB Description

hyperSFN-MSB SFN overflow counter most significant bits

plmn-IdentityList Public land mobile network identities

trackingAreaCode Tracking area code

cellIdentity E-UTRAN Cell identity

cellBarred Identifies if the cell is barred

intraFreqReselection Used to control cell reselection if barred

q-RxLevMin Minimum required RX level in the cell (dBm)

q-QualMin Minimum quality level in the cell (dB)

freqBandIndicator indicates the E-UTRA operating band

schedulingInfoList Denotes the different SIB that will be

transmitted and related transmission parameters

si-WindowLength Denotes the search windows within which the

SIBs will be transmitted

3.6.3 SystemInformationBlockTypeX-NB

SystemInformationBlockTypeX-NB (SIBX) refers to system information block where Xis greater than 1. The SIB1 contains a list of which SIBX blocks will be transmitted

25

Page 33: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

during a SIB1 cycle. These blocks and their use will only briefly be discussed.

SystemInformationBlockType2-NB

The SystemInformationBlockType2-NB (SIB2) message contains information related tocommon user equipment radio resources.The message contains the RadioResourceConfig-CommonSIB-NB information element which configurates several important parameterssuch as the default paging cycle and the aptly named nB parameter that is used todetermine paging information (see 5.1.1) It is vital to receive this information block inorder to make a random access attempt as this message denotes among other parametersthe uplink carrier frequency, common time-alignment parameter as well as setting severalconstants and timers used by the user equipment.

SystemInformationBlockType3-NB

Contains cell re-selection parameters, and is therefore out of scope for this thesis as ourapproach is one cell, one user equipment.

SystemInformationBlockType4-NB

Contains information related to the neighboring cells, and is therefore out of scope forthis thesis as our approach is one cell, one user equipment.

SystemInformationBlockType5-NB

Contains information related to other NB-IoT cells within the same band, and is thereforeout of scope for this thesis as our approach is one cell, one user equipment.

SystemInformationBlockType14-NB

SystemInformationBlockType14-NB (SIB14) contains access-barring parameters whichare required to be received when the ab-Enabled parameter in the MIB is set to ’barred’.If ab-Enabled is set as barred the user equipment receives the SIB14 and check theparameter to see if the access barring applies to it. Else the user equipment proceeds asnormal.

SystemInformationBlockType16-NB

The SystemInformationBlockType16-NB (SIB16) is used to obtain GPS timing and thecoordinated universal time (UTC), as well as the local time offset from UTC.

26

Page 34: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

3.7 Downlink control information

The Downlink Control Information (DCI) exists in three formats: N0, N1, and N2. Eachone of them contains different pieces of information that are used in one or multiplechannels for scheduling, both at the uplink and the downlink side. Each DCI is valid fora single cell and a single radio network temporary identifier (RNTI) encoded implicitlyin the CRC.[3, sec. 6.4.3]

3.7.1 Format N0

For each uplink cell there is a N0 message that controls its narrowband physical uplinkshared channel (NPUSCH) scheduling. It consists of 23 bits (see an overview in figure3.22) and contains the following, with the most-significant bit first:[3, sec. 6.4.3.1]

• 1 bit DCI format flag.

– ’0’ for format N0.

– ’1’ for format N1 (see section 3.7.2).

• 6 bits subcarrier indicator ISC, see table 3.8 for values and figure 3.21 for an illus-tration of which subcarriers are to be used.

Table 3.8: Values of subcarrier indicator for given sets of allocated subcarriers nSC.

ISC nSC

0-11 ISC

12-15 3(ISC-12)+{0,1,2}16-17 6(ISC-16)+{0,1,2,3,4,5}18 {0,1,2,3,4,5,6,7,8,9,10,11}19-63 Reserved

27

Page 35: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Figure 3.21: Subcarriers indicated by ISC . For values 0-11 only that subcarrier is tobe used. Values 12-15 indicate one of the four quarters of the subcarriers. 16 and 17indicate either the top or bottom half of the subframe. 18 indicates all the subcarriers.Values 19-63 are reserved.

• 3 bits resource assignment indicator IRU, see table 3.9. A resource unit is defined asnumber of symbols in a slot (always 7 in NB-IoT) multiplied by number of slots inUL of consecutive single-carrier frequency-division multiple access scheme symbolsif looking at the time domain (subframe), while in the frequency domain it is simplygiven by the number of single carrier resource units parameter.2

Table 3.9: Values of resource assignment indicator for a number of resource units NRU.

IRU 0 1 2 3 4 5 6 7

NRU 1 2 3 4 5 6 8 10

• 2 bits scheduling delay indicator IDelay, see table 3.10. This delay marks the numberof a DL subframe after the one carrying this N0 DCI that is meant to be used fortransmission of format 1 NPUSCH.3

2[2, sec. 10.1.2.3]3[4, 16.5.1]

28

Page 36: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Table 3.10: Values of scheduling delay indicator for a given constant k0.

IDelay k0

0 8

1 16

2 32

3 64

• 4 bits modulation and coding scheme indicator IMCS marking modulation schemeused and in combination with the resource unit indicator earlier determines thetransport block size, see tables 3.11 and 3.12.

Table 3.11: Values of modulation and coding scheme indicator for given modulationorder QM and transport block size index ITBS.

IMCS QM ITBS

0 1 0

1 1 2

2 2 1

3 2 3

4 2 4

5 2 5

6 2 6

7 2 7

8 2 8

9 2 9

10 2 10

29

Page 37: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Table 3.12: Indicator of available numbers of elements to be transferred in a singleblock, i.e. values of NPUSCH transport block size indicator, for given values of ITBS andresource unit indicator IRU .

ITBSIRU

0 1 2 3 4 5 6 7

0 16 32 56 88 120 152 208 256

1 24 56 88 144 176 208 256 344

2 32 72 144 176 208 256 328 424

3 40 104 176 208 256 328 440 568

4 56 120 208 256 328 408 552 680

5 72 144 224 328 424 504 680 872

6 88 176 256 392 504 600 808 1000

7 104 224 328 472 584 712 1000 -

8 120 256 392 536 680 808 - -

9 136 296 456 616 776 936 - -

10 144 328 504 680 872 1000 - -

11 176 376 584 776 1000 - - -

12 208 440 680 1000 - - - -

• 1 bit redundancy version flag.

• 3 bits repetition number indicator IRep of NPUSCH subframes, see table 3.13.

Table 3.13: Values of repetition number indicator for the number of repetitions NRep.

IRep 0 1 2 3 4 5 6 7

NRep 1 2 4 8 16 32 64 128

• 1 bit new data flag.

• 2 bits DCI subframe repetition number.

Figure 3.22: An overview of the contents of DCI N0. DCI format bit is always ’0’ forN0.

30

Page 38: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

3.7.2 Format N1

Each NPDSCH codeword in one cell is assigned one DCI format N1 message contain-ing its scheduling information. Also every narrowband physical random-access channel(NPRACH) uses this format for obtaining its scheduling information. A format N1 mes-sage consists of 23 bits (see an overview in figure 3.23) with the following information,starting with the most-significant bit:[3, sec. 6.4.3.2]

• 1 bit DCI format flag.

– ’0’ for format N0 (see section 3.7.1).

– ’1’ for format N1.

• 1 bit NPDCCH order indicator.

– ’1’ and if CRC is scrambled with C-RNTI it marks that this information isused for scheduling NPRACH. Except for signaling NPDRACH, C-RNTI is anidentifier used in differentiating UE and is received by the UE after establishinga connection.

∗ 2 bits starting number of NPRACH repetitions.

∗ 6 bits subcarrier indication of NPRACH ISC , see table 3.8 and figure 3.21.

∗ 13 remaining bits are set to ’1’.

– ’0’ is used for NPDSCH scheduling.

∗ 3 bits scheduling delay indicator IDelay. It can be translated to the numberof DL subframes to pass before starting NPDSCH transmission, see table3.14.

Table 3.14: Values of scheduling delay indicator for a given delay before NPDSCHtransmission k0 in number of DL subframes, and maximum number of repetitions Rmax.

IDelayk0

Rmax < 128 Rmax ≥ 128

0 0 0

1 4 16

2 8 32

3 12 64

4 16 128

5 32 256

6 64 512

7 128 1024

∗ 3 bits resource assignment indicator ISF marking the number of DL sub-frames scheduled for NPDSCH, see table 3.15.

31

Page 39: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Table 3.15: Values of resource assignment indicator for the number of subframes NSF.

ISF 0 1 2 3 4 5 6 7

NSF 1 2 3 4 5 6 8 10

∗ 4 bits modulation and coding scheme indicator IMCS. If Qm = 2 thenIMCS = ITBS and the transport block size index ITBS can be found intable 3.16.

Table 3.16: Indicator of available numbers of elements to be transferred in a singleblock, i.e. values of NPDSCH transport block size indicator, for given values of ITBS andresource unit indicator ISF .

ITBSISF

0 1 2 3 4 5 6 7

0 16 32 56 88 120 152 208 256

1 24 56 88 144 176 208 256 344

2 32 72 144 176 208 256 328 424

3 40 104 176 208 256 328 440 568

4 56 120 208 256 328 408 552 680

5 72 144 224 328 424 504 680 -

6 88 176 256 392 504 600 - -

7 104 224 328 472 584 680 - -

8 120 256 392 536 680 - - -

9 136 296 456 616 - - - -

10 144 328 504 680 - - - -

11 176 376 584 - - - - -

12 208 440 680 - - - - -

∗ 4 bits repetition number indicator IRep, see table 3.17.

Table 3.17: Values of repetition number indicator for the number of repetitions NRep.

IRep 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

NRep 1 2 4 8 16 32 64 128 192 256 384 512 768 1024 1536 2048

∗ 1 bit new data indicator flag (or reserved if N1 CRC is scrambled withrandom access RNTI [RA-RNTI], the identifier of the time-frequency re-source used by the UE for the random access preamble).

∗ 4 bits HARQ-ACK resource (or reserved if N1 CRC is scrambled withRA-RNTI).

32

Page 40: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

∗ 2 bits DCI subframe repetition number R. Its application can be seen insection 5.1.

In case of N1 being shorter than the 23 bits of N0 then it must be appended with zerosuntil it is 23 bits long.

Figure 3.23: An overview of the contents of DCI N1. DCI format bit is always ’0’ forN1. The top illustration represents the DCI not used for the random-access procedure(order indicator set to ’0’, part of the message might be reserved if scrambled with RA-RNTI), while the bottom one shows the DCI for the random access procedure (orderindicator set to ’1’, 12 last bits set to ’1’).

3.7.3 Format N2

DCI format N2 is shorter than the other two formats, consisting of 15 bits (see an overviewin figure 3.24). It is used for two purposes: direct indication and paging for NPDSCH,informing the UE about system and parameter modifications or issuing warning messages.Its composition, starting with the most-significant bit is:

• 1 bit flag indicating if the message shall be used for

– direct indication, if it is set to ’0’.

∗ 8 bits for conveying direct indication of many fields, e.g. the system updateor earthquake and tsunami warning indication.

∗ 6 bits are reserved.

– paging, if it is set to ’1’.

∗ 3 bits resource assignment indicator ISF, see table 3.15.

∗ 4 bits modulation and coding scheme indicator IMCS. If Qm = 2 thenIMCS = ITBS and the transport block size index ITBS can be found intable 3.16.

33

Page 41: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

∗ 4 bits repetition number indicator IRep, see table 3.17.

∗ 3 bits DCI subframe repetition number R. Its application can be seen insection 5.1.

Figure 3.24: An overview of the contents of DCI N2. The top illustration shows thecase of N2 being used for direct indication (first bit set to ’0’) and the bottom shows N2for paging (first bit set to ’1’).

3.8 Sequences

3.8.1 Gold sequence

In order to maximise the number of UEs that can be accessed at once with minimalinterference, a spreading code, i.e. scrambling of encoded channels, is used. One of thesecodes is the Gold sequence. The Gold sequence is a result of modulo 2 binary additionof two m-sequences, in LTE and NB-IoT given by

c(n) = (m1(n+NC) +m2(n+NC))mod(2), [2, sec. 7.2] (3.14)

m1(n+ 31) = (m1(n+ 3) +m1(n))mod(2), (3.15)

m2(n+ 31) = (m2(n+ 3) +m2(n+ 2) +m2(n+ 1) +m2(n))mod(2), (3.16)

where NC = 1600 and the length n is chosen as needed. The m-sequences are selectedrather than randomly generated, making it only pseudo-random, in order to guaranteegood cross-correlation and autocorrelation properties of the scrambled signal, i.e. theyare three-valued over a code period, the values being:

ρij(τ) =

−1/N,

−t(n)/N,

(t(n)− 2)/N,

34

Page 42: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

where N is the sequence’s length, and

t(n) =

2(n+1)/2 + 1 n odd,

2(n+2)/2 + 1 n even.

As can be seen in equations 3.15 and 3.16 there are 30 first values missing. They have tobe initialized, the first sequence with m1(0) = 1, m1(n) = 0, n = 1, 2, 3..., 30, while thesecond sequence’s initialisation is uniquely assigned for each channel. For specific valuessee the scrambling part of the relevant channel.[2, sec. 7.2]

3.8.2 Zadoff-Chu sequence

The so called Zadoff-Chu sequences are a type of constant amplitude, zero autocorre-lation sequences developed through a series of correspondances initiated by an articlewritten by R. C. Heimiller[12]. Following the publication, Frank and Zadoff wrote acorrespondance[9] to Heimillers work describing a patent using a generalized version ofthe code. Lastly a correspondance by Chu [7] leads to the general form used in NB-IoTthat is given by equation 3.17.

ak = eiπk(k+1)

N (3.17)

-1 -0.5 0 0.5 1

In-Phase

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Qu

ad

ratu

re

Zadoff-Chu sequence

Figure 3.25: Demonstration of the constant amplitude property of the Zadoff-Chusequence, the point are generated with k = 1,2,...,154 and N = 131.

35

Page 43: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

In the same correspondance he also demonstrates that any length of code may be phase-coded using this sequence and that certain variations of the sequence does not affect itsproperties. Variations that do not affect the autocorrelation properties include additionof a constant, cyclic shifts and conjugation. An essential property used in NB-IoT is

that the sequence allows for certain linear phase shifts (e2πqkN ). This property is used to

encode the NSSS (described in 3.5.7) with additional information on the current frametiming within the system.

3.8.3 Hadamard Matrices

Hadamard matrices are square matrices of order n consisting of elements only containing+1 (+) and -1 (-) with defining characteristic of rows being pairwise orthogonal. Thematrix is also non-singular with an inverse n−1H ′. This resulting in equality of equation3.18 for a Hadamard matrix.

H ′H = HH ′ = nI (3.18)

This meaning that the columns of the matrices are also pairwise orthogonal, or that amatrix is a Hadamard matrix if and only if its transpose is also a Hadamard matrix.[11]

A Hadamard matrix is used in NB-IoT LTE to generate a coding mask used as partof the decision process for finding the physical cell identity from the secondary synchro-nization signal transmitted by the base station. For a further description of usage inNB-IoT, see section 3.5.7.

3.9 Error rates

The simulator will run several error rate tests, they will be breifly described in the fol-lowing subsections.

3.9.1 Block error ratio

The block error ratio (BLER) is measured by transmitting blocks of data through thechannel and decoding them on the (NPDSCH) terminal side. After decoding, the cyclicredundancy bits are checked, if no errors are detected the block is marked as a successfultransfer else it is marked as a failed transfer. The BLER is reported as the fraction givenin equation 3.19

BLER = 1− Successful Transfers

Total Transfers(3.19)

3.9.2 Channel bit error rate

The channel bit error rate (CBER) is measured by transmitting blocks of data throughthe channel and doing a hard-bit QPSK demodulation and then comparing it to the

36

Page 44: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

original bits. The number of erroneous bits are summed up over several blocks and theCBER is represented by the fraction given in equation 3.20.

CBER =Erroneous bits

Total transmitted bits(3.20)

3.9.3 Post-equalization bit error rate

The post-equalization bit error rate (PEQ-BER) is measured by transmitting blocks ofdata through the channel and equalizer and doing a hard-bit QPSK demodulation andthen comparing it to the original bits. The number of erroneous bits are summed up overseveral blocks and the PEQ-BER is represented by the fraction given in equation 3.21.This BER is comparable to the one described in

PEQ-BER =Post-EQ Erroneous bits

Total transmitted bits(3.21)

37

Page 45: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

4 Simulator design

4.1 Overview

The simulator consists of 3 major blocks as can be seen in figure 4.1. The core block(yellow in figure) consists of 3 top-level functions. The graphical user interface (GUI)that gives the end-user a simple approach to configuring the system to their needs, aswell as ease of access to plots related to their chosen setup is not discussed further in thethesis. Main, the top-level simulation script which initializes the system and does theerror measurements. And the core of the simulator is the aptly named simCore script.This script step-by-step calls all the necessary functions to perform the simulation. The

Figure 4.1: Simple overview of the design of the simulation system. Each white boxrepresents a function or a group of functions. The 3 colored boxes represent grouping offunctions dependent on the role in the system. The yellow core group contains the toplevel functions that the end-user may directly interact with. The green box contains thedata generator relevant functions. The blue box contains the terminal processing relevantfunctions.

green box contains the base-station emulation that schedules the channels depending onwhich mode is chosen and then generates the required time-frequency grids as describedin section 3.1. The blue terminal box contains both the channel-level functions (such asOFDM-baseband modulation/demodulation and channel models) and the terminal-sideprocessing function (such as the different channel descramblers and decoders).

38

Page 46: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

4.2 Main

The simulator main-file is the file used to start the simulator run, it reads in the config-uration structures and the general-use structures detailed in section 4.2.1 from .xml filesand based on the chosen mode either runs a repeated data-only loop or a single normalmode run containing all of the downlink channels available. The main file also performsthe error rate calculations described in section 3.9.

4.2.1 Structures

In order to move data and settings between the different functions the choice to usestructures was made. The different structures in use are described briefly in this sectionand the different parameters in the structures are described in their respective appendixentries.

Structure: Config Appendix A.1

The Config structure contain the core basestation parameters for the system and mostfunction calls use at least one of these parameters during their operation. Exampleparameters include subcarriers and symbols per slot in the system.

Structure: ControlDL Appendix A.2

The ControlDL structure is used to change the core functionality settings such as whetheror not the functions implement a level of fixed-point truncation, and the number of bitsthese fixed-point truncations use and whether to use signed or unsigned values. This is asetting put into the system in order to be able to replace the function calls currently inthe system with the users own fixed point implementations. Example parameters includefixed point enables and fixed point types.

Structure: ElementTypeValues Appendix A.3

The ElementTypeValues structure contains the specific integer values used to identifydifferent signals and channels resource element allocation. When generating any subframegrid containing data a secondary grid is also generated containing the resource allocationinformation. It is in these secondary grids the values in this structure are used. Examplefields include NRS and NPBCH.

Structure: FrameConfig Appendix A.5

The FrameConfig structure is used to relay frame information such as the different sub-frame types within a frame or the current frame number being processed. Example fieldsinclude starting and ending frame for the simulation, the current frame and subframetypes in that frame.

Structure: ScheInfo Appendix A.6

The ScheInfo structure carries information related to the frame scheduling and encodedbits. It is used to determine how certain data should be scheduled on the NPDSCH and

39

Page 47: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

NPDCCH channel. Example fields include SIB1 frames, the original unencoded bits forNPDCH and generation flags for NPDCH.

Structure: ScheduledData Appendix A.7

The ScheduledData structure carries the raw bit information that will be transmittedon the NPBCH, NPDSCH and NPDCCH. It also carries the format information for theNPDCCH bits. Example fields include the NPBCH bits and the NPDSCH bits.

Structure: NdcchConfig Appendix A.8

The NdcchConfig structure carries information related to the scheduling of the controlchannel, such as the paging settings and compare-values used to determine paging occa-sions and paging frames. Example parameters include the default paging cycle and thenumber of repetitions for paging messages.

Structure: Settings Appendix A.9

Settings structure contains run-specific information such as the chosen base-station mode,SNR ranges and enabled error tests. Example parameters include the SNR range, thenumber of runs and the error tests enables.

Structure: UeStatus Appendix A.10

The UeStatus structure contains the information on the current search spaces tracked bythe user-equipment and which frame it switched to a different mode. Example field isthe current UE search space.

4.3 Core

The simCore matlab script starts by initializing variables and constants used in thesimulations. Following initialization a decision is made by checking the field ’mode’ inthe Settings structure. If the mode is set as ’Dsch-only’ the steps followed are outlinedin 4.3.1. If it is set as ’Normal’ it will run the full simulation as described in 4.3.2.

4.3.1 Dsch-only

The Dsch-only mode is the downlink shared channel(DSCH) only mode used to do errorrate tests in the simulation. It is a stripped down version of the simulator that only sendsone packet of random data on the DSCH per run and spans over a range of SNRs. Byincreasing the number of runs you increase the accuracy of the measurements. The stepby step of the DSCH-only mode follows these calls:

1. Generate data packets

To generate packets the function dschOnlySim (described in B.1.1) was developed.

2. Schedule data / Generate time-frequency grids

40

Page 48: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

To handle scheduling and grid generation the function dschOnlyGen (describedin B.1.2) was developed.

3. OFDM-baseband modulation

See section 7.1 for OFDM modulation function.

4. Apply channel

See section 7.2 for channel function.

5. OFDM-baseband demodulation

See section 7.1 for OFDM demodulation function.

6. Select terminal path

In order to select the correct path on the terminal side the function mbltePath-Select (described in B.1.3) was developed.

7. Equalize

The equalization contains several steps. See sections 8.1and 8.2.

8. Decoding

The decoding contains several steps. See section 8.3.3

9. Repeat steps 3 to 8 until all symbols have been processed.

Once the last step is complete the function returns control to main, where either a newrun is started directly or a step in the SNR is made before calling simCore.

4.3.2 Normal

The Normal mode is the full simulator mode that runs all the downlink channels. Itis used to generate a full set of data that emulates a NB-IoT deployment. The datacan be extracted on different level such as the time-frequency grid to be transmitted,the time-domain signal to be transmitted, the noisy time-domain signal, or the receivedtime-frequency grid. The simulator therefore also allows for testing of functions beingdeveloped for use in physical user-equipment by extracting test vectors as opposed toonly in the virtual user-equipment. The step by step of the Normal mode follows thesecalls:

1. Schedule / Generate data packets

The scheduling function is described in section 5 and the encoding of the datapackets is described in section 6.1.

41

Page 49: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

2. Generate time-frequency grids

The generation of the time-frequency grids are described in section 6.2

3. OFDM-baseband modulation

See section 7.1 for OFDM modulation function.

4. Apply channel

See section 7.2 for channel function.

5. OFDM-baseband demodulation

See section 7.1 for OFDM demodulation function.

6. Select terminal path

In order to select the correct path on the terminal side the function mbltePath-Select (described in B.1.3) was developed.

7. Equalize

The equalization contains several steps. See sections 8.1and 8.2.

8. Decoding

The decoding contains several steps. See section 8.3.

9. Repeat steps 3 to 8 until all symbols within a frame have been processed.

10. Repeat steps 1 to 9 until all required frames have been processed.

Once the last step is completed the simulation returns control to main where the simu-lation is ended.

42

Page 50: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

5 Channel scheduling

To handle the dynamic scheduling of the different channels the mblteSchedule function(described in B.2) was developed. This function is called as a part of the Normal-modesimulation described in 4.3.2 The subsections following described the procedures usedby the terminal to determine where to look for different channels. The process withinmblteSchedule uses the same process to determine where to place the channels. Anexample scheduling is given in figure 5.1.

0 1 2 3 4 5 6 7 8 9 0 1

NPBCH

NSSSNPSSSIB1

NPDCCH NPBCH NPDCCHNPDCCH

MIB

……

NPDSCH

Figure 5.1: An example scheduling of 12 subframes. The NPBCH and NPSS will alwayshave the same placement in a radio frame. The NPDCCH and NPDCCH subframes willvary. If the SIB1 is scheduled during the radio frame it will always be found in subframe4.

5.1 Control channel search spaces

All user equipment must monitor a certain set of NPDCCH search spaces. A user equip-ment is however not required to monitor more than one type of search space. The 3different search spaces are detailed in the following subsections.

5.1.1 Common search space type 1 - Paging

The common search space type 1 is the paging search space used to reach user-equipmentin idle mode.

In order to determine where a user-equipment should look for its paging control channelit first needs to determine the Paging Frame (PF), this is done by performing the calcu-lations in equation 5.1 and all frames fulfilling this equation are considered PFs.[5]

SFNmod(T ) = (T

N) ∗ (UE IDmod(N)) (5.1)

Where T is the Discontinuous reception(DRX) cycle broadcast by the system in the SIB2,SFN is the System frame number, UE ID is given by equation:

UE ID = IMSImod(4096) (5.2)

43

Page 51: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

where IMSI is the International Mobile Subscriber Identity provided by the SIM-card inthe user equipment, and N is given by equation:

N = min(T, nB) (5.3)

where nB is a constant multiple of T.

After determining the PF, the user-equipment must determine the valid Paging Occasions(POs). This is done by calculating the value i s in equation:

i s = floor(UE ID)mod(Ns) (5.4)

where Ns is given by equation:

Ns = max(1,nB

T) (5.5)

and referring to table 5.1. A demonstration of paging scheduling with certain parametersis given in figure 5.2

Table 5.1: In order to determine the paging occasion for a specific user-equipment onecalculates the value i s and Ns and then consults the table in order to find which subframeis valid.

Ns PO when i s = 0 PO when i s = 1 PO when i s = 2 PO when i s = 3

1 9 - - -

2 4 9 - -

4 0 4 5 9

0 1 2 3 4 5 6 7 8 9 0 1

NSSNPSSNPBCH

𝐼𝑀𝑆𝐼 = 0

𝑈𝐸−𝐼𝐷 = 𝐼𝑀𝑆𝐼 𝑚𝑜𝑑 4096 = 0

𝑁 = 𝑇

𝑇

𝑁∗ 𝑈𝐸−𝐼𝐷 𝑚𝑜𝑑 𝑁 = 0

𝑛𝐵 = 1𝑇

𝑇 = 128

Valid Paging frames: 𝑆𝐹𝑁 𝑚𝑜𝑑 𝑇 = 0

𝑃𝐹 = 0,128,256…

𝑖−𝑠 = 𝑓𝑙𝑜𝑜𝑟 𝑈𝐸−𝐼𝐷𝑚𝑜𝑑𝑁𝑠 = 0

𝑁𝑠 = max 1,𝑛𝐵

𝑇= 1

Paging Occasions given as subframe 9,but it’s occupied by higher priority signal NSSS. Check next subframe.

…NPBCH

SFN = 0 SFN = 1

Also occupied by higher priority channel NPBCH. Check next subframe.

Free subframe, Paging is scheduled here.

NPDCCH

Paging scheduling example:

Figure 5.2: An example calculation of the paging frame and determination of thepaging occasion. An important attribute to note is that when the paging occasion occurson a subframe where a different channel is scheduled, the occasion is shifted to the nextavailable downlink subframe.

44

Page 52: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

The allowed repetition levels for paging are found in table 5.2. This table combined withthe starting PF and PO creates a set of search spaces where you look for the pagingmessage.

Table 5.2: Search space candidates for type 1. If Rmax is set, the values in the R columnare the repetitions that need to be monitored for a DCI-message of the format stated inthe DCI Format-column.

Rmax R DCI Format

1 1 N1

2 1,2 N1

4 1,2,4 N1

8 1,2,4,8 N1

16 1,2,4,8,16 N1

32 1,2,4,8,16,32 N1

64 1,2,4,8,16,32,64 N1

128 1,2,4,8,16,32,64,128 N1

256 1,4,8,16,32,64,128,256 N1

512 1,4,16,32,64,128,256,512 N1

1024 1,8,32,64,128,256,512,1024 N1

2048 1,8,64,128,256,512,1024,2048 N1

5.1.2 Common search space type 2 - Random Access

The common search space type 2 is considered to be the random access (RA) searchspace. This is the space where the user-equipment looks for responses to the randomaccess attempts.

In order to determine the starting subframe kb one first must find the subframes k0satisfying equation 5.6.

(10nf + floor(ns2

)mod(T ) = αoffset ∗ T (5.6)

where T is given by 5.7, nf is the frame number, ns is the slot number and αoffset isgiven by the parameter npdcch-startSFoffset-Type2CSS.

T = Rmax ∗G (5.7)

where Rmax is given by the parameter npdcch-MaxNumRepetitions-RA and G is givenby the parameter npdcch-startSF-Type2CSS.

Once the subframes k0 have been determined, the b values are calculated using equa-

45

Page 53: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

tion 5.8.b = u ∗R (5.8)

where u = 0,1,..,RmaxR− 1 and R are the values given by table 5.3 based on the Rmax

parameter. The values of b determine the number of subframes offset from k0 for thestarting frames kb.

Table 5.3: Search space candidates for type 2. If Rmax is set, the values in the R columnare the repetitions that need to be monitored for a DCI-message of the format stated inthe DCI Format column.

Rmax R DCI Format

1 1 N1

21 N1

2 N1

4

1 N1

2 N1

4 N1

>= 8

Rmax8

N1Rmax

4N1

Rmax2

N1

Rmax N1

5.1.3 User-specific search spaces

The user-specific search space (USS) can be configured to be transmitted on a differentresource block other than the standard block containing the NPSS/NSSS/NPBCH. Thisgives the system more flexibility ensuring that more user-equipment (UE) are able toreceive control channel information. If configured with a secondary resource block theUE the should monitor this resource block and not the standard block. If it is notconfigured with a secondary block it should monitor the standard block containing theNPSS/NSSS/NPBCH.

The process for finding the search space candidates is similar to that for the commonsearch space type 2 outlined in subsection 5.1.2, with some changes to the variables anda slightly modified table. The table 5.3 is replaced by table 5.4 and the changed variablesare:

• Rmax given by parameter al-Repetition-USS

• G given by npdcch-startSF-UESS

• αoffset given by npdcch-startSFoffset-UESS

46

Page 54: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Table 5.4: Search space candidates for the User specific search space. If Rmax is set, thevalues in the R column are the repetitions that need to be monitored for a DCI-messageof the format stated in the DCI Format column.

Rmax R Format

1 1 N0/N1

21 N0/N1

2 N1

4

1 N1

2 N1

4 N1

>= 8

Rmax8

N1Rmax

4N1

Rmax2

N1

Rmax N1

As can be seen in table 5.4 the USS also uses the N0 format DCI-message in some cases.This allows for single control channel elements (CCEs) unlike format N1 that requiresboth of the CCEs in a subframe. One CCE spans 6 subcarriers, either the span 0-5 or6-11. Since it is unknown beforehand which CCE is used, the search space candidatesinclude both of these individual CCEs as Format N0 messages or both together as aFormat N1 message.

5.2 Narrowband physical broadcast channel

The transmission time interval (TTI) of the narrowband physical channel is 640 ms,equaling 64 radio frames. After these 640 ms the MasterInformationBlock-NB describedin section 3.6.1 is updated with new frame number information and any other parametersthat may have changed. When updating the MIB the new data is encoded using theprocess described in section 6.1.2. One block of the data is then transmitted in subframe0 of every radio frame until the next TTI when the process is repeated. The process isvisualized in figure 5.3

47

Page 55: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

0 1 2 3 4 5 6 7

NPBCH

0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7 8 9

80 ms

640 ms

10 ms

Repetition of block in each radio frame

Transmission of block in subframe 0

Full MIB transmission period64 radio frames

8 radio frames

1 radio frame

MIB transmission on NPBCH

Figure 5.3: The MIB block to be transmitted on NPBCH is transmitted over a periodof 640ms. Once the MIB is encoded the transport block is transmitted in subframe 0 ofevery radio frame. Each block is repeated 7 times following the initial transmission.

5.3 Narrowband synchronization signals

The narrowband primary synchronization signal is described in section 3.5.6. It is sched-uled in subframe 5 of every radio frame and is transmitted in the same form everytime.

The narrowband secondary synchronization signal is described in section 3.5.7. It isscheduled in every other radio frame in subframe 9. The formula for which frames theNSSS is scheduled in is nfmod(2) = 0, where nf is the system frame number (SFN). TheNSSS varies with the SFN in a 80ms cycle using the cyclic shift term e−j2πθfn, whereθf = 33

132(nf/2)mod(4).

48

Page 56: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

5.4 Narrowband physical downlink shared channel

The common data channel is scheduled with a minimum offset of 4ms from the end ofthe NPDCCH transmission that scheduled it. The system information blocks are alsotransmitted on the NPDSCH, SystemInformationBlockType1-NB uses a fixed scheduleand is described in 5.4.1 and the windows where SystemInformationBlockTypeX-NB aretransmitted are discussed in 5.4.2.

5.4.1 SystemInformationBlockType1-NB

SystemInformationBlockType1-NB message is described in section 3.6.2. The SIB1 istransmitted on the NPDSCH and follows a set schedule with a 2560ms periodicity. Thetransmission is always done in subframe 4 and is transmitted in every other frame for 16contiguous frames. The starting frame is determined by the combination of the numberof repetitions and the physical cell identity as in table 5.5. The procedure follows thesimple algorithm:

1. Determine Number of Repetitions from schedulingInfoSIB1

2. Choose correct modulo operation

3. Calculate result of NNcellID modulo X

4. Determine Starting frame from table 5.5.

5. Allocate the required frames.

This process is executed in the mblteSchedule function described in section 5.

Table 5.5: To determine in which frame the SystemInformationBlockType1-NB starts,the combination of the Num. Repetions and Cell Identity is used. The Starting framecolumn gives the modulo value of the frames in which you will find a new transmissionof the SIB1 message.

Num. Repetitions Cell ID Starting frame (nfmod256)

4

NNcellID mod(4) = 0 0

NNcellID mod(4) = 1 16

NNcellID mod(4) = 2 32

NNcellID mod(4) = 3 48

8NNcellID mod(2) = 0 0

NNcellID mod(2) = 1 16

16NNcellID mod(2) = 0 0

NNcellID mod(2) = 1 1

49

Page 57: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

5.4.2 SystemInformationBlockTypeX-NB

The other system information blocks, SIBX (X = 2,3,4,5,14,16) are scheduled by System-InformationBlockType1-NB. The SIBX-messages make use of periodical time-domainwindows called system information windows (SI-windows). Each message uses one win-dow and the windows do not overlap. Which messages get scheduled within one SIB1-cycle may vary and in order to acquire SIBX one must first receive the information inSIB1. The window-length and window-periodicity are parameters given in SIB1 and usedto determine where the different SIBX messages are scheduled. The steps for schedulinga SIBX follow:

1. Determine the number n corresponding to the placement of the entry in the scheduling-InfoList in SIB1.

2. Calculate x = (n− 1) ∗ w,where w is the si-WindowLength given in SIB1

3. Calculate (HSFN ∗ 1024 + SFN)mod(T ) = floor(x/10)+Offset,where HSFN is the Hyper system frame number, SFN is the system frame number, Tis the si-Periodicity given in SIB1 and Offset is the si-RadioFrameOffset parameterin SIB1. If a SFN/HSFN fulfills the equality then the frame is considered thestarting frame and the SI-Window starts from subframe 0.

The SIBX is transmitted over either 2 or 8 consecutive downlink subframes dependingon the transport block size and it may be repeated during the SI-window.

50

Page 58: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

6 Base station-side processing

6.1 Channel processing

Before transmission of each subframe the channels must be prepared by being encoded,rate matched, and scrambled. A single processing function is called for each of thechannels.

6.1.1 Narrowband physical downlink shared channel

The data in the NPDSCH is protected by being encoded. This process, together withscrambling, is done in function mblteDschEncode. The first code is the cyclic redundancycode, see section 3.4.1, adding parity bits to the data symbol. Generator polynomial usedfor this operation is of the 24A type for the NPDSCH. This block is then coded usinga tail-biting convolutional code of rate 1/3, resulting in a codeword of three times thelength of the original data. This codeword can later be used to reconstruct the encodedmessage using bit error minimisation, as described more in-depth in section 3.4.2. Thisis then rate matched to the assigned transport block size (3.4.3).[3, sec. 6.4.2]

This encoded transport block is then scrambled using a pseudo-random Gold sequencedescribed in section 3.8.1, initialised as specified in section 3.5.1. As up to four repetitionswill be transmitted a different part of the scrambling sequence is used for each repetition.The scrambling is re-initialised for each new transmission, but it is done outside of thisfunction.

6.1.2 Narrowband physical broadcast channel

Processing of the master information block in the NPBCH is split between two functions.Encoding is done after creating the MIB in mblteMIB. There it is subjected to CRCencoding described in section 3.4.1, with polynomial type 16. A mask is also applied tothe added parity bits using the xor operation with each consecutive value. The maskdepends on the number of transmit antennas and can be seen in table 6.1. Then a tail-biting convolutional code of rate 1/3 is applied with a codeword of triple the length ofthe original MIB. The process is described in section 3.4.2. The codeword is then ratematched, see section 3.4.3, to a scheduled length.[3, 6.4.1]

The processing continues in function mblteNPBCH with scrambling, as can be read inthe case of the NPDSCH in section 6.1.1 above. The scrambling sequence initialisation isgiven in section 3.5.2. The subframe will be repeated seven times before scrambling willbe re-initialised, therefore the scrambling sequence has to cover a size of eight times thesize of the rate matched MIB.

51

Page 59: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Table 6.1: Mask applied to the CRC-added bits during MIB encoding in NB-IoT.

Number of transmit antenna ports NPBCH CRC mask

1 < 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >

2 < 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 >

6.1.3 Narrowband physical downlink control channel

Encoding and processing of the NPDCCH is done in function mblteDCCHEncode. Thecontrol information is processes almost identically to the data in NPDSCH, as describedin section 6.1.1. The difference lies in scrambling, as it is initiated with the sequencefound in section 3.5.3 and it only needs to be as long as the control information, as wellas scrambling of the CRC. The scrambled values of the DCI with CRC are [3, sec. 5.3.3.2,6.4.3]

ck = (bk + xrnti,k−A + xAS,k−A)mod(2), for k = A,A+ 1, ..., A+ 15, (6.1)

where A is the length before CRC attachment, bk are the CRC parity bits, xrnti,i is acorresponding RNTI value, and xAS,i is a corresponding mask value. Mask is used if theantenna port is known or relevant, and can be found in table 6.2, otherwise it is notused.

Table 6.2: Mask applied to scrambling the CRC for NPDCCH.

UE transmit antenna selection Mask

UE port 0 < 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >

UE port 1 < 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 >

6.2 Radio frame generation

In order to generate the grid of time-frequency grid, as described in section 3.1, a seriesof MATLAB calls was developed. The higher level functions are described below whileseveral of the sub-calls related to specific types of channels are outlined in the followingsubsections.

The function mblteGenFrame (described in B.3.1) generates up to 10 subframes (1 frame)depending on how the parameters in the input structures are set. To facilitate the gener-ation of different types of subframes mblteGenFrame calls mblteGenSubframe (describedin B.3.2), which functions as a path selector based on the information available in Frame-Config. This function then depending on the subframe type passes control to the correctchannel-specific function.

The general steps used in the channel-specific functions is outlined in figure 6.1. Thesteps in the figure are repeated for each signal and/or channel in a subframe. The figurealso demonstrates how matlab labels the elements within the matrix.

52

Page 60: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

1 13 … … … … 73 … … … … … 145 157

2 158

3 …

4 …

5 …

6 …

7 …

8 …

9 …

10 …

11 167

12 24 … … … … 84 … … … … … 156 168

MATLAB matrix, indexing a subframe

Generating a subframe:1. Call indexing function

that determines which of the grid indexes are allowed to be used.

2. Call signal generation function that generates the signal

3. Place generated signal into the indices in the resource grid

Example:Indices = [ 14:23 74:83 146:155];Signal = randn(1,30);Signal is placed in order into the matrix in increasing indices on the green cells.

Figure 6.1: The general outline for generating a subframe grid. For each channel orsignal in the subframe the functions first call the relevant indexing function, then itgenerates the signal, and lastly places it into the relevant locations described by theindices. The figure also shows how matlab indexes its matrices by the numbering ofcertain cells.

6.2.1 Narrowband physical broadcast channel

To generate an NPBCH subframe the MATLAB call mblteNpbchSubframe (describedin B.3.5) was developed. This function uses the data scheduled in mblteSchedule andgenerates a grid in accordance with the process described in section 3.5.2.

The function described above also has several NPBCH specific subcalls. The functionmblteNPBCHindices (described in B.3.5) finds the resource allocations for the NBPCHchannel within the subframe and is detailed below.

Once the indices have been established the function calls mblteNPBCH (described inB.3.5) that generates the data points for the NPBCH subframe. The function call followsbelow.

6.2.2 Narrowband physical downlink shared channel

A NPDSCH subframe is generated by the function mblteNdschSubframe. It maps createdreference signals: the CRS, values of which are placeholder QPSK symbols, together with

53

Page 61: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

the NRS, and in the spaces assigned to NPDSCH places data. In order to achieve thatseveral sub-functions are called.

The sub-functions responsible for finding corresponding reference signals are mblteCrsIndices,calculating indices for the CRS as seen in section 3.5.4, mblteNrsIndices, finding indicesfor the NRS, and mblteNrs, creating and mapping the NRS sequence described in section3.5.5.

The generation of the rest of the subframe, i.e. mapping the data, is done as described insection 3.5.1. Indices are found using function mblteNpdschIndices. Then, in mblteNpdsch,the shared channel subframe to be sent is QPSK modulated and mapped to the indices,concluding the creation of a NPDSCH subframe.

For a description of inputs and outputs of the functions used in this section see appendixB.3.6 and appendix B.3.4 for the reference signals.

6.2.3 Narrowband physical downlink control channel

NPDCCH subframe generation is done by mblteNdcchSubframe. This function mapsreference signals CRS, holding placeholder QPSK values, and NRS, together with controlinformation, being placeholder random bits, in its allocated resource elements. This isdone with several sub-functions.

The sub-functions responsible for finding corresponding reference signals are mblteCrsIndices,calculating indices for the CRS as seen in section 3.5.4, mblteNrsIndices, finding indicesfor the NRS, and mblteNrs, creating and mapping the NRS sequence described in section3.5.5.

Control information is first assigned resource elements in the indexing functionmblteNPDCCHindices. The subframe with the control information is then QPSK mod-ulated and mapped in mblteNPDCCH, in a way depending on its format, as specified in3.5.3

The DCI is created in function mblteDCI. Only DCI N2 creation is properly implementedper theory in section 3.7, the other two being random bits, as the function is not beingused in the simulator.

For a description of inputs and outputs of the functions used in this section see appendixB.3.7 and appendix B.3.4 for the reference signals.

6.2.4 Narrowband and cell-specific reference signals

Neither NRS nor CRS does occupy a whole subframe to itself, they are instead mappedto specific resource elements within another subframe, namely those of the NPDSCH andNPDCCH. First the indices are found using a corresponding function, mblteNrsIndicesin case of the NRS (see section 3.5.5) or mblteCrsIndices in case of the CRS (see section3.5.4). They return indices for each of the antenna ports used. A reference signal sequenceis then generated and mapped to the assigned resource elements in case of NRS.

54

Page 62: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

For a description of inputs and outputs of the functions used in this section see appendixB.3.4.

6.2.5 Narrowband primary synchronization signal

To generate a NPSS subframe the MATLAB call mblteNpssSubframe (described in B.3.8)was developed. The function generates a subframe grid in accordance with the processdescribed in section 3.5.6.

The function described above also has several NPSS specific subcalls. The functionmblteNPSSindices (described in B.3.8) finds the resource allocations for the NPSS channelwithin the subframe. Once the indices for resource allocation have been established thefunction calls mblteNPSS (described in B.3.8) that generates the data points for theNPSS subframe.

6.2.6 Narrowband secondary synchronization signal

To generate a NSSS subframe the MATLAB call mblteNsssSubframe (described in B.3.9)was developed. The function generates a subframe grid in accordance with the processdescribed in section 3.5.7. The function described above also has several NSSS specificsubcalls. The function mblteNSSSindices (described in B.3.9) finds the resource alloca-tions for the NSSS channel within the subframe. Once the indices have been establishedthe function calls mblteNSSS (described in B.3.9) that generates the data points for theNSSS subframe.

55

Page 63: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

7 Signal OFDM and channel models

7.1 Orthogonal frequency-division multiplexing modulation anddemodulation

The OFDM modulation consists of four steps done in order: zero padding, inverse fastFourier transform (IFFT), and cyclic prefix addition. Responsible for this is the functionmblteOFDMModulate. After being received this process is reversed in order to retrievethe information sent. The demodulation process includes cyclic prefix removal, down-sampling, fast Fourier transform (FFT), and padding removal. It is carried out in thefunction mblteOFDMDemodulate. As can be seen the steps taken are the opposites of themodulation process and are done in reversed order. Each of the steps mentioned aboveis described in the following subsections, and an overview of the process can be seen infigure 7.1.

Figure 7.1: Overview of the modulation and demodulation processes of OFDM. A 12subcarrier symbol is padded with four zeros up to size 16, IFFT transformed to time data,upsampled by eight by the means of interpolation, and with the last nine or ten symbolscopied and pasted in front of the beginning of the symbol, creating a CP. The signal isthen transferred, being warped by the channel during the process. After receiving it theCP part is removed, the remainder downsampled by eight, transformed back to frequencydata using FFT, and then having the padding removed, leaving a warped symbol thatneeds to be equalised.

56

Page 64: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

7.1.1 Padding addition and removal

A symbol coming directly from a subframe consists of 12 elements. It is then paddedwith two additional zeros at each end to increase its size to 16 in preparation for theIFFT.

The padding removal step is simple removal of the same elements that were added duringthe modulation step, extracting the data from the middle of the vector.

7.1.2 Fast Fourier transform and its inverse

The padded symbol is then transformed into the time domain using the IFFT of size16.

When received the time domain signal has to be transformed into the frequency domainto make reconstruction of the subframe to come possible. It is achieved by reversing theIFFT with FFT of size 16.

7.1.3 Upsampling and downsampling

The newly transformed frequency signal is then upsampled by eight by interpolation.This results a higher sampling rate of 1.92 MHz that allows to include the same numberof samples for each CP.

During demodulation the signal is downsampled by eight to 16 elements as a last stepbefore the FFT. If certain small frequency intervals were being significantly affected bythe channel then the chance of them affecting the data will be decreased, as the sevenvalues in-between the two consecutive data elements are removed.

7.1.4 Cyclic prefix

The last step of OFDM modulation is to add a cyclic prefix. A number of symbols fromthe end of the OFDM symbol are copied and pasted in front of the OFDM, as seen infigure 7.2. In case of NB-IoT the number of symbols is 10. This overhead decreases theeffect of intersymbol interference, as the data itself is being protected by this buffer.

The removal of the cyclic prefix is done by simply removing the correct elements, andwith them the symbols affected by the previously transmitted QPSK symbol.

57

Page 65: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Figure 7.2: Cyclic prefix addition is done by copying the last 10, if it is the first symbolin the slot, or 9, for any other symbol in the slot, elements of a symbol and adding thecopy in the front.

7.2 Channel models

OFDM modulation prepares the signal for entering the channel between the base stationand the terminal. The disturbances happening during the transmission are simulatedin the function mbltePhysicalChannel. Different models are utilised and can be chosenthrough an input structure element. They include the different LTE propagation condi-tions channel models, although not the multi-antenna cases.[1, annexes B.1-B.4]

7.2.1 Static propagation

The first channel model ’Static’ simulates the case of the static propagation condition. Itis used when no fading or multi-path propagation is present and only adds white Gaussiannoise to the signal, with power depending on the SNR.

7.2.2 Multi-path fading propagation

The second model, ’MultiPathFading’, recreates an environment of multi-path fadingpropagation with a Doppler shift. Different customisation possibilities inherent from thefunction lteFadingChannel are set with a structure. One of these options include differentdelay profiles: Extended Pedestrian A, Extended Vehicular A, Extended Typical Urban,custom, and off.4 They are also set using the input structure. There is also a possibilityto add white Gaussian noise to the fading.

7.2.3 High speed train condition

’HighSpeedTrain’ is the third model representing the high speed train condition. Parame-ter values can be set freely according to the specifications for the function lteHSTChannel,to simulate high speed movement of the UE without fading. White Gaussian noise canalso be added on top of this model if wanted.

4These profiles are defined in [1, annex B.2].

58

Page 66: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

7.2.4 Custom

The fourth model is ’Custom’, allowing the user to implement user’s own channel valuesfrom a structure and add white Gaussian noise to the signal if needed.

8 Terminal-side processing

8.1 Channel estimation

The models named in the previous section all distort the encoded OFDM signal. In orderto mitigate this distortion equalisation is performed. However, first a channel estimationis needed. Channel estimation is approximation of the channel conditions using differentmethods. The method used here is called zero-forcing (Z-F). As the NB-IoT is, like LTE,using a training sequence, the channel estimates can be calculated by comparing NRStransmitted with the one received. It is done in mblteEstimateChannel. The basic modelused explaining the different estimation types is

Y = HX +N, (8.1)

where Y is the received signal, X the transmitted sequence, H is the channel, and N thenoise present, assumed to be AWGN. The application of the channel estimators presentedbelow are described in the next section 8.2.

Z-F estimation is forcing a zero value of ISI, although at the same time enhances thenoise, and is calculated by assuming that no noise is present in the system. Thereforeinstead of using the exact model from equation 8.1 the one used is

Y = H ZFX, (8.2)

where Y is the approximate received signal and H ZF is the zero-forcing channel estimate.It then follows that

H ZF =Y

X, (8.3)

and as both Y , being the received signal, and X, being the training sequence, are known,the channel can easily be estimated at each pilot position withing the subframe.[10, ch.11.4.1]

8.2 Equalisation

Armed with the channel estimates from the pilot signal the simulator can apply them onthe rest of the subframe. Here it is done in one of the two ways: using an equaliser (EQ)based on sectors sharing a common channel estimate, and an equaliser that interpolates

59

Page 67: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

those estimates in frequency. However, both use the same equalisation equation

X =Y

H, (8.4)

where X is the data sent, Y the received sequence, and H a channel estimate correspond-ing to the equaliser used.

The sector equaliser is found in mblteSectorEqualizer. The subframe is processed one slotat a time. First, a number of sectors equal to the number of pilots is created, in thecase of NB-IoT it’s four per slot, stretching from the first to the last symbol within theslot. Then the channel estimation using the pilot contained within each of those sectorsis assigned to that sector. This is then repeated for all the other sectors in the first slotand then in the other. After the assigning step all the data in the resource elements isdivided by its sector’s corresponding channel estimate, one sector at a time. The creationof the sectors is illustrated in figure 8.1.

Figure 8.1: Sector creation for the equaliser. The darker squares symbolise the channelestimates obtained from the pilots. Sectors created around them are marked with a lightercolour and are divided with black lines for clarity. The values in the darker squares arethen expanded onto the rest of the sector, resulting in eight common channel estimateareas.

Interpolating equaliser in mblteInterpolationEqualizer works in three steps: averages thechannel estimates, interpolates them, and then equalizes. Averaging is done simply bypicking the channel estimates one by one, matching them with a corresponding channelestimate in the other slot, and averaging them. This results in averaged channel valuesfor four subcarrier frequencies. In order to cover the rest of the subcarriers, the estimatesare interpolated in frequency. Frequencies not laying between two pilot estimates are

60

Page 68: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

extrapolated onto. As there is now a channel estimate for each subcarrier, they can beapplied onto the data that needs equalisation.

Figure 8.2: Averaging and interpolation process for the equaliser. The channel esti-mates from pilots are found in the dark blue resource elements, two values per frequencysubcarrier. They are then averaged within that subcarrier creating the light blue fields.These values are then interpolated between creating green regions and extrapolated ontothe purple fields. The slot separation (thick black line in the middle) does not affect thisequaliser.

8.3 Signal decoding

At this stage the signal should no longer depend on the channel conditions and the datacontents may be studied. Signal decoding is a process of retrieving information hidden inthe received codeword, by reversing the steps done during processing described in section6.1.

8.3.1 Narrowband physical downlink shared channel

The NPDSCH is descrambled and then decoded in mblteNpdschOuterDecoder. The de-scrambling sequence is the same as the scrambling sequence given in section 3.5.1, witha different consecutive part chosen for each repetition.

The descrambled codeword can now be decoded. Convolutional rate recovery de-ratematches the received codeword to the original code block length. Soft bits are keptthroughout all the processes so that the Viterbi decoder can reconstruct the originaldata from the code, as seen in section 3.4.2. This data is then CRC checked and if the

61

Page 69: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

remainder after the polynomial division, using the same polynomial type 24A describedin section 3.4.1, equals zero then the data has probably been received correctly. However,if the remainder differs from zero the data is probably corrupted.

8.3.2 Narrowband physical broadcast channel

NPBCH is decoded in almost the same way as the NPDSCH in section 8.3.1. It is donein the function mblteNPBCHOuterDecoder. The scrambling sequence comes from thebroadcast channel description in section 3.5.2 and a section of it is chosen to match thecurrent repetition number. Rate recovery and Viterbi decoding are done in the same way,and the CRC check operates with the polynomial type 16 and the same mask as usedduring encoding, found in table 6.1.

8.3.3 Narrowband physical downlink control channel

The decoding process is carried out by mblteNPDCCHOuterDecoder and is very similarto that presented in the case of the NPDSCH in section 8.3.1, although the scramblinguses the initialisation sequence found in 3.5.3 and uses the whole sequence. CRC isdescrambled, reversing the process stated in 6.1.3. The rest of the decoding process isthe same.

62

Page 70: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

9 Results

9.1 Feasibility checks

9.1.1 Bit error rate

To check the transfer through an additive white Gaussian noise (AWGN) channel a com-parison between the simulated BER and the theoretical BER is made. The theoreticalBER is calculated using equation 9.1 described by Goldsmith[10, Chapter 6.1.2].

Pb = Q(

√2EbNo

) = Q(√

2γb) (9.1)

Where γb is the SNR per bit (EbNo

) and Q is the statistical Q function as defined in equation9.2

Q(x) =1√2π

∫ ∞x

e−u2

2 du (9.2)

The simulated data is generated using a 16 bit block with 24bit CRC and no repetitionfor an inband deployment. The step-length is set to 1 and for each step 200bits istransmitted 100 times. The simulation implements no equalization in order to alignwith the theoretical BER calculation. The graphical comparison can be seen in figure9.1.

-50 -40 -30 -20 -10 0 10

SNR(dB)

10-3

10-2

10-1

100

BE

R

BER vs SNR

Theoretical

Simulated

Figure 9.1: Comparing the developed NB-IoT downlink simulator bit error rates to atheoretically calculated bit error rate.

63

Page 71: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

9.1.2 Repetitions

To check the implementation of repetitions on the NPDSCH several simulations are runwith various repetition settings with a 16 bit transport block with 24bit CRC and aninband deployment. The channel is as in section 9.1.1 an AWGN channel and using noequalizer. The expected increase in performance for repetitions is determined by that adoubling of repetitions doubles the bit energy relative to the noise. Using equation 9.1from section 9.1.1 with a doubling of bit energy for each doubling of repetitions, figure9.2 is generated for the repetition settings 1, 4, 64, 512 and 2048.

-50 -40 -30 -20 -10 0 10

SNR (dB)

10-3

10-2

10-1

100

BE

R

Theoretical BER vs SNR

1 Repetition

4 Repetitions

64 Repetitions

512 Repetitions

2048 Repetitions

Figure 9.2: Graphical representation of the estimated bit error rates for various number

of repetition settings. Each curve is calculated using Pb = Q(√

2log2(numRepetitions)

√2EbNo

)

and every doubling of repetitions should left shift the curve by 3dB.

Each doubling of repetitions should therefore shift the bit error curves by 10∗log10(√

2)dB.The same shift is to be expected from the block error curves if no other parameter thanthe repetitions are changed.

64

Page 72: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

-50 -45 -40 -35 -30 -25 -20 -15 -10 -5 0

SNR (dB)

10-2

10-1

100

BL

ER

BLER vs SNR

1 Rep

4 Rep

64 Rep

512 Rep

2048 Rep

Figure 9.3: Graphing the simulated block error rates for various repetitions. Eachdoubling of repetitions is expected to lead to a left-shift of the curve by 3dB.

Comparing the shift in neighbouring curves in the simulated BLER between the 1 rep-etition and 4 repetition curves it is expected to see a difference of 6dB. Between the 4repetition and 64 repetition curves it is expect to see a difference of 12dB. Between the64 repetition and 512 repetition curves it is expected to see a 9dB difference. Finallybetween 512 and 2048 it is expected to see a 6dB difference. The curves in figure 9.3corresponds well to these expectations.

9.1.3 Channel comparison

In order to verify the behavior of the NPBCH and NPDCCH a longer simulation is runin the normal-mode to verify the block error rates on these channels. The results arepresented in figure 9.4.

As expected the NPDCCH closely follows the unrepeated NPDSCH when the block-sizes are similiar and the NPBCH curve is as expected left-shifted in relation to the otherchannels due to the accumulation of repetitions.

65

Page 73: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

-20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0

SNR (dB)

10-2

10-1

100NPBCH

-20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0

SNR (dB)

10-2

10-1

100

BL

ER

NPDCCH

-20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0

SNR (dB)

10-2

10-1

100NPDSCH

Figure 9.4: The results from an SNR sweep run in normal-mode with in-band settings.Starting point -20 dB with 0.5dB step-size to 0 dB. NPBCH is accumulated 8 times beforebeing decoded. NPDCCH and NPDSCH are not repeated.

9.1.4 Narrowband reference signal mapping pattern

The mapping pattern of the NRS pattern can be seen in figure 9.5. The mapping of NRS-1follows a zig-zag pattern with two subcarriers in between. The other NRS, NRS-2, mirrorsNRS-1. Both NRS patterns are then repeated in the other slot of the subframe.

66

Page 74: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Figure 9.5: A broadcast subframe with reference signals present. The white spaces areempty as per specifications. NRS-1 corresponds to the NRS present in the subframe,while NRS-2 marks reserved resource elements that are used by the other antenna port.

9.2 Equaliser performance

Equaliser performance has been tested on two cases: a custom channel model and thehigh speed train scenario 1, with parameters seen in table 9.1. The tests consisted ofBLER check on these two channels with added white Gaussian noise (WGN), found infigures 9.6 and 9.7, as well as QPSK spectra found in figures 9.8 through 9.14.

BLER test results are averages from 1000 runs for a given SNR tested.

Data in form of QPSK symbols from a NPDSCH subframe is plotted after going throughchannel before equalization step and after. Each of the equalisers is tested with the samecustom channel and train condition as above, except that no WGN has been added.Constellations for the fading channel model can be found in appendix C.

Both the sector and the interpolating equalisers decrease the BLER when compared tono equaliser at all, when looking at the cases highlighted above. In the custom channelcondition in figure 9.6 10% BLER is achieved at around 1 dB for interpolation and 2.5dB for the sector EQ, while the test without any EQ shows only a minor decrease inBLER in the interval studied. The interpolating EQ has the lowest decrease for mostof the SNRs, only being overtaken by the sector equaliser above 4 dB SNR, with itsBLER decreasing more sharply in the custom channel test. A possible explanation forthis slope difference can be seen in the QPSK spectra in figures 9.10, where some ofthe points after the interpolation are further away and some closer to origo than thepoints before equalisation, and 9.8, where the sector-equalised points lie closer to theradius of the perfect QPSK locations. However, BLER for the high speed train case infigure 9.7 is lower on the whole interval tested for the interpolation equaliser, even thoughthe elongated constellation spread is also present, as seen in figure 9.13. 10% BLER isachieved at around 0 dB for the interpolation and about 4 dB for the zone EQ. Thedifference here is larger than for the previous channel case.

67

Page 75: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Table 9.1: Condition parameters for the high speed train condition scenario 1, simulatinga train moving through an open space.

Parameter Value

DS 1000 m

Dmin 50 m

v 350 km/h

fd 1340 Hz

-10 -8 -6 -4 -2 0 2 4 6

SNR [dB]

10 -2

10 -1

10 0

Blo

ck e

rro

r ra

te

Channel estimation performance, custom

Sector EQ

Interpolating EQ

No EQ

Figure 9.6: Block error rate vs SNR for custom channel and AWGN. The channel is0.25 · sin(2πft) + 0.5 + (0.25 · cos(2πft) + 0.5)i, with frequency f = 1.92 · 106 Hz.

68

Page 76: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

-10 -8 -6 -4 -2 0 2 4 6

SNR [dB]

10 -2

10 -1

10 0

Blo

ck e

rro

r ra

te

Channel estimation performance, high speed train

Sector EQ

Interpolating EQ

No EQ

Figure 9.7: Block error rate vs SNR for the high speed train channel condition andAWGN. Parameter values are found in table 9.1. Note: they are not customised for thismodel.

69

Page 77: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

-2 -1.5 -1 -0.5 0 0.5 1 1.5

In phase

-1.5

-1

-0.5

0

0.5

1

1.5

Qua

drat

ure

Sector EQ after custom channel

Signal before EQSignal after EQPerfect QPSK locations

Figure 9.8: QPSK spectrum before and after equalisation using the sector equaliserunder custom channel condition.

-1 -0.5 0 0.5 1

In phase

-1.5

-1

-0.5

0

0.5

1

1.5

Qua

drat

ure

Sector EQ after custom channel

Signal before EQSignal after EQPerfect QPSK locations

Figure 9.9: QPSK spectrum before and after equalisation using the sector equaliserunder custom channel condition, zoomed in.

70

Page 78: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

-3 -2 -1 0 1 2 3

In phase

-3

-2

-1

0

1

2

3

Qua

drat

ure

Interpolation EQ after custom channel

Signal before EQSignal after EQPerfect QPSK locations

Figure 9.10: QPSK spectrum before and after equalisation using the interpolatingequaliser under custom channel condition.

-1.5 -1 -0.5 0 0.5 1

In phase

-1

-0.5

0

0.5

1

1.5

Qua

drat

ure

Interpolation EQ after custom channel

Signal before EQSignal after EQPerfect QPSK locations

Figure 9.11: QPSK spectrum before and after equalisation using the interpolatingequaliser under custom channel condition, zoomed in.

71

Page 79: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

-1.5 -1 -0.5 0 0.5 1 1.5

In phase

-1.5

-1

-0.5

0

0.5

1

1.5

Qua

drat

ure

Sector EQ after high speed train condition

Signal before EQSignal after EQPerfect QPSK locations

Figure 9.12: QPSK spectrum before and after equalisation using the sector equaliserunder high speed train condition scenario 1.

-4 -3 -2 -1 0 1 2 3 4

In phase

-4

-3

-2

-1

0

1

2

3

4

Qua

drat

ure

Interpolation EQ after high speed train condition

Signal before EQSignal after EQPerfect QPSK locations

Figure 9.13: QPSK spectrum before and after equalisation using the interpolatingequaliser under high speed train condition scenario 1.

72

Page 80: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

-1.5 -1 -0.5 0 0.5 1

In phase

-1

-0.5

0

0.5

1

Qua

drat

ure

Interpolation EQ after high speed train condition

Signal before EQSignal after EQPerfect QPSK locations

Figure 9.14: QPSK spectrum before and after equalisation using the interpolatingequaliser under high speed train condition scenario 1, zoomed in.

73

Page 81: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

10 Conclusion

The aim of the thesis was to develop a toolkit and simulator for the LTE NB-IoT downlinkaccording to the 3GPP release 13 specifications documents. A simulation environment hasbeen created where simulation environment ties the virtual basestation, channel modelsand virtual user equipment into two linked scripts.

On basestation side basic implementations of the available channels have been made. Thechannel implementations require an input data block to be transmitted and then attachesthe correct CRC, codes using the specified encoder, rate matches the coded block asappropriate, scrambles the block and then generates time-frequency grids according tothe specifications. Implementations of LTE NB-IoT signals NRS, NPSS, NSSS have beenmade and included. A basic channel scheduling unit handling the scheduling of NPBCH,NPSS, NSSS, NPDSCH and the downlink relevant type of NPDCCH. The schedulingonly handles the SIB1 system information.

On the terminal side channel estimation and equalization have been implemented, andthe signals are decoded by reversing the encoding steps: descrambling, de-rate matching,decoding using the Viterbi algorithm and removal of the CRC bits. A simple CRC checkis used to measure block error rates.

11 Discussion

The development of a toolkit for data generation has been successful. However, many ofthe functions are dependent on several simulator-specific structures to import requiredparameters. This choice was made early in development in order to reduce the numberof parameters passed to certain functions and speed up development. This approachfunctions very well within our environment but imposes certain limitations on program-mers using the functions to develop their own simulation environment. Any programmerattempting to use the toolkit must conform to our standard structure and naming con-vention. In order to generate a more versatile toolkit, the lower level functions couldhave been written to take the parameters, instead of structures, as arguments. Naturally,writing the functions in this manner would also increase the requirement of NB-IoT-specific knowledge to correctly set parameters, and the resulting function calls beingmuch longer.

In order to check that our simulator functions as expected some testing is performed. Thetest presented in the result section 9.1.1 tests the transmission of bits on the NPDSCHthrough a static propagation (AWGN) channel and closely resembles the theoretical curve.This demonstrates that the chaining of functions required for transmitting is behaving asexpected and that the QPSK modulation and demodulation are functioning. This resultsapplies primarily to NPDSCH on the base-station side. A more exhausting test of thechaining and individual functions is the repetition block error test in section 9.1.2 thatrequires the entire NPDSCH chain to be functioning in order to successfully receive theblock. This test also demonstrates that the implementation of soft combining is workingas intended. One of the drawbacks of the comparative test of block errors to bit errors in

74

Page 82: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

the test design is the assumption that the baseline block error (that for 1 repetition) is initself correct. Any static error (such as the possibility of a start up block error) would stillbe present when varying the repetition setting. The test is considered a successful oneas an approximate gain of 3 dB per doubling of repetitions is achieved. Both the test in9.1.1 and 9.1.2 are performed in the ’DSCH-only’ -mode presented in 4.3.1, and thereforeimposes a limit on the applicability of the results as an indication of the state of thesimulator. This was done in order to reduce the simulation times required for the tests.In order to provide the more accurate testing a longer simulation was run in normal-modemeasuring the block error rates on NPBCH, NPDSCH and NPDCCH, and as describedin section 9.1.3, this simulation was used to verify the behavior of all channels similiar tothe test done in section 9.1.2.

The NRS, being a signal with a specific mapping pattern, can be checked visually as a partof a subframe, as seen in figure 9.5. It seems to follow the pattern from the specificationsdocument seen in figure 3.15, NRS-1 zig-zaging with a spacing of 2 subcarriers in betweenin the first slot. The other NRS with reserved elements in the subframe, NRS-2, mirrorsNRS-1. Both NRS patterns are then repeated in the other slot of the subframe. Thisbehaviour can also be seen in the example NRS from the specifications. However, ifpattern for a specific cell ID would have been known from the specifications then aclearer comparison could have been made.

The constellation diagrams in presented in section 9.2 show behavior of the QPSK datapoints. In both figures one can see that the ring of QPSK symbols received but not yetequalised is placed scattered, some of it very close to the quadrature axis or the in-phaseaxis, some maybe passing over into the neighbouring quadrants. This may lead to errors,as a QPSK moved to another quadrant will be decoded as another value. It can be seenthat in the case of the interpolation equaliser the QPSK symbols are moved towards themiddle of a corresponding quadrant, although at different distances from the origo. Thismay be due to the channel estimates being averaged from only two values for each givensubcarrier. However, the points lie clearly in one of the sectors and not on the border,and together with the BLER plots it can be stated that the compensation for the channelis adequate for the interpolating equaliser. On the other hand, the QPSK values afterequalisation with the sector equaliser are only slightly more compact and still lie close tothe axes. They also are moved from the origo a bit more than unequalised data, but muchless than in the previous case. Therefore, together with the BLER tests, it shows that theinterpolation equaliser performs more reliably to the sector one, with overall lower BLERand QPSK constellations further from the axes. The use of the interpolation equaliser istherefore recommended over the sector one, as a more consistent performance with lessambiguities can be expected from it, although at the cost of a computationally heavyinterpolation.

In summary, a toolkit and a simulator for NB-IoT have been implemented. Certainaspects of the simulator and toolkit have been tested. More tests should be run to verifythe functionality of the toolbox and simulator.

75

Page 83: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

12 Further work

Even though the toolkit gives a good starting point for testing of NB-IoT layer 1 downlinkalgorithms there are many improvements that could be made, both in the simulationenvironment and in the toolkit. A noteworthy improvement could be the introduction ofreal messages into the toolkit so that these messages can be used to test the interactionbetween L1 and L2.

Further testing would ensure the validity of transmissions when the data is spread overmultiple subframes on NPDSCH, as all testing has been done with the number of sub-frames parameter set to 1, and only a brief visual inspection of the time-frequency gridshas been performed to check that data is placed into multiple subframes. Further in-vestigation is also required to ensure that the scheduling function is performing as ex-pected.

The channel is currently estimated using Z-F only. Another approach, minimizing themean-square error approach could also be implemented and tested alongside Z-F. It worksexactly as Z-F when there is no noise present, but as it includes a noise estimate term aswell it should yield even less errors in estimating noisy channels.

Further work could also be done using our toolkit as a basis to create a full virtual basestation with implementations of L2 and L3 functionality coupled with a radio transmitterto do algorithm testing on a target platform.

76

Page 84: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

References

[1] 3rd Generation Partnership Project. Technical Specifications 36:104, release 13.

[2] 3rd Generation Partnership Project. Technical Specifications 36:211, release 13.

[3] 3rd Generation Partnership Project. Technical Specifications 36:212, release 13.

[4] 3rd Generation Partnership Project. Technical Specifications 36:213, release 13.

[5] 3rd Generation Partnership Project. Technical Specifications 36:304, release 13.

[6] 3rd Generation Partnership Project. Technical Specifications 36:331, release 13.

[7] D. Chu. Polyphase codes with good periodic correlation properties (corresp.). IEEETransactions on Information Theory, 18(4):531–532, 1972.

[8] E. Dahlman, S. Parkvall, and J. Skold. 4G LTE/LTE-Advanced for Mobile Broad-band. Academic Press, 2011.

[9] R. Frank, S. Zadoff, and R. Heimiller. Phase shift pulse codes with good periodiccorrelation properties (corresp.). IRE Transactions on Information Theory, 8(6):381– 382, 1962.

[10] A. Goldsmith. Wireless Communications. Cambridge University Press, 8th edition,2013.

[11] A. Hedayat and W.D. Wallis. Hadamard matrices and their applica-tions. The Annals of Statistics, 6(6):1184–1238, 1978. Can be found athttp://projecteuclid.org/euclid.aos/1176344370 as of 2007.

[12] R. Heimiller. Phase shift pulse codes with good periodic correlation properties. IRETransactions on Information Theory, 7(4):254–257, 1961.

[13] W. W. Peterson and D. T. Brown. Cyclic codes for error detection.Proceedings of the IRE, 49(1):228–235, January 1961. Can be found athttp://ieeexplore.ieee.org/document/4066263/ as of 2007.

[14] Y.-P. E. Wang, X. Lin, A. Adhikary, A. Grovlen, Y. Sui, Y. Blankenship, J. Bergman,and H. S. Razaghi. A primer on 3gpp narrowband internet of things (nb-iot). 2016.https://arxiv.org/pdf/1606.04171.pdf.

77

Page 85: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

A Structures:

A.1 Config

Table A.1

Parameter name Description (default)

subcarriers subcarriers in system (12)

symbols symbols per slot (7)

cellID physical cell ID of enb (20)

n DLRB CRS number of LTE downlink resource blocks (1)

n maxDL RB largest number of LTE downlink resource blocks (1)

CRS frame structure Type LTE frame structure (1)

nrs ports antenna ports used for NRS transmission (0)

numNpbchBits number of NPBCH bits (1600)

ChannelRasterOffset raster offset in kHz, string (’khz2dot5’)

eutraCRSSequenceInfo 1

eutraNumCRSPorts 1

operationModeInfo deployment mode information, string (’01’)

sibRepeat SIB repetition parameter (2)

Antennas Number of Tx antennas (1)

CurrentPort Current antenna port (0)

dlGapPeriodicity NPDSCH transmission gap periodicity (3)

dlGapDurationCoeff NPDSCH transmission gap duration (1)

eutraControlRegionSize nr of slots/subframe used by LTE for the control signals (3)

RNTI Value of currently used RNTI (0)

SNR signal to noise ratio in dB for AWGN (40)

IMSI International mobile subscriber identity (3)

A.2 ControlDL

Fixed point and MEX settings.channelOperationFixP = 0 (disable)channelOperationFixP = 1 (enable)channelOperationType = (int bits, fractional bits, sign)sign = 0 (unsigned)sign = 1 (signed)channelOperationMex = 0 (disable)channelOperationMex = 1 (enable)

i

Page 86: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Fixed point implies that truncation will be made. Mex should NOT be enabled underany circumstance in the current implementation of the simulator.

Table A.2

Parameter name default

dschDescramblingFixP 0

dschDescramblingType (0,0,0)

dschRateRecoverFixP 0

dschRateRecoverType (0,0,0)

dschViterbiFixP 0

dschViterbiType (0,0,0)

dcchDescramblingFixP 0

dcchDescramblingType (0,0,0)

dcchRateRecoverFixP 0

dcchRateRecoverType (0,0,0)

dcchViterbiFixP 0

dcchViterbiType (0,0,0)

bchDescramblingFixP 0

bchDescramblingType (0,0,0)

bchRateRecoverFixP 0

bchRateRecoverType (0,0,0)

bchViterbiFixP 0

bchViterbiType (0,0,0)

channelFftFixP 0

channelFftFixP (0,0,0)

dschDescramblingMex 0

dschRateRecoverMex 0

dschViterbiMex 0

dcchDescramblingMex 0

dcchRateRecoverMex 0

dcchViterbiMex 0

bchDescramblingMex 0

bchRateRecoverMex 0

bchViterbiMex 0

channelFftMex 0

ii

Page 87: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

A.3 ElementTypeValues

Structure defines values used to identify resource allocation in time-frequency grids.

Table A.3

Parameter name Default values

CRS 20

NRS1 18

NRS2 19

NPDSCH 3

NPDCCH 2

NPBCH 12

NPSS 8

NSSS 6

A.4 Enb

Structure for creating the DCI. So far only DCI N1 implemented.

Table A.4

Parameter name Description (default)

DCIFormat DCI format (’FormatN1’)

RandomAccess Random access flag.

NPRACHRep Starting number of NPRACH repetitons.

NPRACHSubcInd Subcarrier index for NPRACH.

SchedDelay NPDSCH scheduling delay.

Rmax Maximum number of repetitions.

NrOfSubframes Number of subframes.

TranspBlkSize Transport block size.

RepNumber Numbers of repetitions.

newData New data flag.

HARQACK HARQ-ACK message.

DCIRep Number of DCI repetitions.

iii

Page 88: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

A.5 FrameConfig

Table A.5

Parameter name Description (default)

startFrame Starting frame for the simulation (1)

endFrame Ending frame for the simulation (10)

startSubframe Starting subframe of each frame (1)

endSubframe Ending subframe of each frame (10)

currentFrame Current frame, used in the simulation, does not need to be edited.

currentSubframe Current subframe, used in the simulation, does not need to be edited.

frameType Defines type of subframes in a frame, does not need to be edited.

example: (’B’,’U’,’U’,’U’,’P’,’U’,’U’,’U’,’U’,’S’)

A.6 ScheInfo

Scheduling information, carries information within the simulation. Fields do not needediting.

Table A.6

Parameter name Description

SIB1frames vector of SIB1 frame numbers

sib1Size bit size of SIB

nextSIB nect frame number containing SIB

dataEncLength number of bits in the encoded data for each subframe.

dschNeedGen flag for if data has been scheduled but not generated.

processedDschData processed data to be placed in a subframe.

dschSubLeft Counter tracking how many subframes are left to be placed

dschSubPlaced Counter tracking how many subframes have been placed.

dsch subframe offset parameter setting the minimum offset between dcch and dsch

dschOriginData dsch bit values before processing.

cchSubframe subframe number containing the npdcch

cchOriginData dcch bit values before processing

cchFlag flags if cch has been scheduled but needs placement

currentProcessedData tracks which processed data should be used.

diffFrame flag tracking if data needs to be placed in a different frame.

schEndSubframe last subframe containing dsch data.

iv

Page 89: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

A.7 ScheduledData

Table A.7

Parameter name Description

cchData data to be placed in NPDCCH subframes

dschData data to be placed in NPDSCH subframes

dschDataSib1Flag flags if data is SIB1

npbchBits data to be placed in NPBCH

MIB Master information block bits

cchFormat Format of the dcch message.

v

Page 90: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

A.8 NdcchConfig

Table A.8

Parameter name Description

DefaultPagingCycle Default paging cycle

nB defined in 36.213

NumRepetitionPaging al-Repetition-CSS-Paging described in 36.213

assumed to be parameter npdcch-NumRepetitionPaging

in 36.331

UE ID IMSI mod 4096 for NB-IoT, 36.304

PagingOccasion Determined by code using available parameters. 36.304

N Determined by code using available parameters. 36.304

Ns Determined by code using available parameters. 36.304

pagingFrameCompare Determined by code using available parameters.

Used as value to compare if current frame is a possible

paging frame.

startSF Type2CSS RA 36.331, usage not implemented.

Used for random access attempt search space.

startSF offsetType2CSS RA usage not implemented.

Used for random access attempt search space.

NumRepetitions RA usage not implemented.

Used for random access attempt.

startSF UESS npdcch-StartSF-USS in 36.331

startSFoffset UESS npdcch-Offset-USS in 36.331

NumRepetitions npdcch-Offset-USS in 36.331

UssCompare Determined by code using available parameters.

Used as value to compare if current frame is

a possible USS search space.

UssT Determined by code using available parameters.

Used as value to determine UssCompare.

vi

Page 91: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

A.9 Settings

Table A.9

Parameter name Description

mode Defines simulation mode as described in 4.3.1

(’DSCH-only’) or 4.3.2 (’Normal’)

numberOfRuns number of runs, if mode set as ’Normal’, this should be set as 1.

If set as ’DSCH-only’ parameter defines the number of runs for every

SNR step.

snrMax Highest SNR for the simulation in dB

snrMin Lowest SNR for the simulation in dB

snrStep length of SNR step between snrMax and snrMin

numSubframes number of subframes per DSCH block

numRepetitions number of repetitions per DSCH block

transportBlockSize transport block size as defined in 36.213

CBER ENABLE channel bit error measurement enable

PEQBER ENABLE post-equalization bit error measurement enable

BLER ENABLE block error rate measurement enable

A.10 UeStatus

Table A.10

Parameter name Description

contactMode Contact mode, Paging or USS

contactModeSwitchSfn frame number where switch between modes happened.

contactModeSwitchSub subframe number where switch between modes happened.

vii

Page 92: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

B Help: Functions

B.1 Simulation functions

B.1.1 dschOnlySim

Prepare DSCH-only mode data

[FRAMECONFIG, FRAMETYPES, DATAORIGIN, FULLDATA] = ...

DSCHONLYSIM(TRANSPORTBLOCKSIZE, REPETITIONS, NUMSUBFRAMES, FRAMECONFIG,

CONFIG)

Prepares the DSCH-only mode simulation by generating a transport block,

encoding it and doing initial frame allocation. For use together with

dschOnlyGen in simCore.

TRANSPORTBLOCKSIZE double value containing transport block size.

REPETITIONS number of repetitions for every subframe.

NUMSUBFRAMES number of subframes per transmission.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

CONFIG is a general purpose configuration structure.

FRAMETYPES prepared frame allocation for dschOnlyGen.

DATAORIGIN unencoded double ones and zeroes constituting the transmitted

block.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields.

B.1.2 dschOnlyGen

Scheduling and generation for DSCH-only

[FRAMEDATA, FRAMEINFO, FRAMETYPES, CONFIG, SCHEDULEDDATA, FRAMECONFIG,

SCHEINFO] = DSCHONLYGEN(FULLDATA, FRAMETYPES, CONFIG, SCHEDULEDDATA,

FRAMECONFIG, SCHEINFO)

Performs the scheduling and frame generation for DSCH-only. It is the

analogous to normalSim for normal mode. Should not be used outside simCore.

FRAMEDATA time-frequency data radioframe. Matrix 12 by 140.

FRAMEINFO time-frequency resource allocation radioframe. Matrix 12 by 140.

FRAMETYPES defines subframe types.

CONFIG is a general purpose configuration structure.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

SCHEDULEDDATA is the data to transmit carrying structure.

SCHEINFO is the scheduling information structure.

FULLDATA contains the encoded data to be placed.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

viii

Page 93: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

for information on structure fields.

B.1.3 mbltePathSelect

Choose downlink path.

[PATH, CURRSLOT] = MBLTEPATHSELECT(SYMBOL, FRAMECONFIG)

Chooses the correct downlink channel path depending on the current symbol and

the information in ’FrameConfig.frameType’.

SYMBOL current OFDM symbol in the frame as a double.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

PATH is the returned path label.

CURRSLOT is the first slot of the subframe to which the symbol belongs.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields.

B.2 Scheduling

Scheduling and data generation for Normal mode

[CONFIG, SCHEDULEDDATA, FRAMECONFIG, SCHEINFO, NDCCHCONFIG, UESTATUS) = ...

MBLTESCHEDULE(SCHEDULEDDATA, SCHEINFO, FRAMECONFIG, CONFIG, NDCCHCONFIG)

Performs the scheduling and data block generation and encoding for Normal

mode.

CONFIG is a general purpose configuration structure.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

SCHEDULEDDATA is the data to transmit carrying structure.

SCHEINFO is the scheduling information structure.

NDCCHCONFIG is the control channel configuration structure.

UESTATUS is the contact-mode information structure.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields.

B.3 Grid generation functions

B.3.1 mblteGenFrame

Generate a radio frame.

[FRAME, GINFOS] = MBLTEGENFRAME(CONFIG, FRAMECONFIG, ...

SCHEDULEDDATA, ELEMENTTYPEVALUES)

Generates a set time-frequency subframe grids and concatenates them into one

ix

Page 94: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

continuous radio frame grid.

CONFIG is a general purpose configuration structure.

ELEMENTTYPEVALUES is a structure defining integer values for each signal and

channel.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

SCHEDULEDDATA is the data to transmit carrying structure.

FRAME is a double matrix size subcarriers by 10*(symbols per subframe)

carrying the actual channel time-frequency data.

GINFOS is a double matrix size subcarriers by 10*(symbols per subframe)

carrying ELEMENTTYPEVALUES definitions for each resource element within the

radio frame.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields.

B.3.2 mblteGenSubframe

Generate a subframe.

[SUBFRAME, GRIDINFO] = MBLTEGENSUBFRAME(FRAMECONFIG, CONFIG, ...

SCHEDULEDDATA, ELEMENTTYPEVALUES)

Generates a time-frequency grid (subframe).

CONFIG is a general purpose configuration structure.

ELEMENTTYPEVALUES is a structure defining integer values for each signal and

channel.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

SCHEDULEDDATA is the data to transmit carrying structure.

SUBFRAME is a double matrix size subcarriers by (symbols per subframe)

carrying the actual channel time-frequency data.

GRIDINFO is a double matrix size subcarriers by (symbols per subframe)

carrying ELEMENTTYPEVALUES definitions for each resource element within the

subframe.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields.

Example:

% generate a NPBCH subframe.

Config = xml_read(’Config.xml’);

ElementTypeValues = xml_read(’ElementTypeValues.xml’);

FrameConfig = xml_read(’FrameConfig.xml’);

ScheduledData = xml_read(’ScheduledData.xml’);

FrameConfig.currentSubframe = 1;

x

Page 95: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

FrameConfig.frameType(1) = ’B’;

[subframe,gridInfo] = mblteGenSubframe...

(FrameConfig,Config,ScheduledData,ElementTypeValues);

B.3.3 Cell-specific Reference Signal

mblteCRSindices

MBLTECRSINDICES generates grid indices for CRS.

[INDICESPORT0, INDICESPORT1, INDICESPORT2, INDICESPORT3] =

MBLTECRSINDICES(CONFIG) generates indices INDICESPORTX for port X

from the legacy signal CRS. CONFIG is a struct that must contain the

following fields:

subcarriers - the number of subcarriers in a subframe.

cellID - the narrowband cell ID.

symbols - the number of symbols in a slot.

n_DLRB_CRS - downlink bandwidth configuration.

nrs_ports - current port being mapped.

B.3.4 Narrowband Reference Signal

mblteNRSindices

MBLTENRSINDICES generate grid indices for NRS.

[INDICESPORT0, INDICESPORT1] = MBLTENRSINDICES(CONFIG)returns NRS

indices INDICESPORT0 and INDICESPORT1 for each of the ports used. Struct

CONFIG must contain the following:

subcarriers - number of subcarriers in a subframe.

cellID - narrowband cell ID.

symbols - number of symbols in a slot.

nrs_ports - ports used by the NRS (0 or 1).

operationModeInfo - string containing two-bit information about the

operation mode.

Example:

% Generate NRS indices.

Config = xml_read(’Config.xml’)

[indices0, indices1] = mblteNrsIndices(Config)

mblteNRS

MBLTENRS generate the NRS signal sequence.

[SIGNALNRSPORT0, SIGNALNRSPORT1] = MBLTENRS(INDICESPORT0, INDICESPORT1,

xi

Page 96: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

FRAMECONFIG, CONFIG) generates and maps NRS signals SIGNALNRSPORT0 and

SIGNALNRSPORT1 for port 0 and port 1 respectively. Indices for the ports

are INDICESPORT0 and INDICESPORT1 respectively, the contents of structs

FRAME_CONFIG and CONFIG are outlined below.

FRAME_CONFIG:

currentSubframe - the current subframe.

CONFIG:

nrs_ports - ports used by the NRS (0 or 1).

cellID - narrowband cell ID.

subcarriers - number of subcarriers in a subframe.

symbols - number of symbols in a slot.

n_maxDL_RB - largest downlink bandwidth configuration.

B.3.5 Narrowband Physical Broadcast Channel

mblteNpbchSubframe

Creates a NPBCH subframe.

[SUBFRAME, GRIDINFO] = MBLTENPBCHSUBFRAME(CONFIG, ELEMENTTYPEVALUES, ...

FRAMECONFIG, SCHEDULEDDATA)

Generates a time-frequency grid (subframe). This specific function generates

a narrowband physical broadcast channel subframe using data in SCHEDULEDDATA.

CONFIG is a general purpose configuration structure.

ELEMENTTYPEVALUES is a structure defining integer values for each signal and

channel.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

SCHEDULEDDATA is the data to transmit carrying structure.

SUBFRAME is a double matrix size subcarriers by (symbols per subframe)

carrying the actual channel time-frequency data.

GRIDINFO is a double matrix size subcarriers by (symbols per subframe)

carrying ELEMENTTYPEVALUES definitions for each resource element within the

subframe.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields.

Example:

% generate a NPDSCH subframe.

Config = xml_read(’Config.xml’);

ElementTypeValues = xml_read(’ElementTypeValues.xml’);

FrameConfig = xml_read(’FrameConfig.xml’);

ScheduledData = xml_read(’ScheduledData.xml’);

FrameConfig.currentFrame = 1;

[subframe, gridInfo] = mblteNpbchSubframe(Config, ElementTypeValues, ...

xii

Page 97: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

FrameConfig, ScheduledData);

mblteNPBCHindices

Generates NPBCH indices.

INDICES = MBLTENPBCHINDICES(FRAMECONFIG, CONFIG, HIGHERPRIORITYSIGNALINDICES)

Generates resource element allocation indices for the narrowband physical

broadcast channel.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

CONFIG is a general purpose configuration structure.

HIGHERPRIORITYSIGNALINDICES is a double vector containing indices to any

signals in that NPBCH should avoid.

RETURNINDICES is a double matrix containing resource element allocation for

NPBCH.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields.

Example:

% Generate NPBCH indices.

Config = xml_read(’Config.xml’)

FrameConfig = xml_read(’FrameConfig.xml’)

higherPrioritySignalIndices = [];

FrameConfig.currentFrame = 1;

FrameConfig.currentSubframe = 1;

indices = mblteNpbchIndices(FrameConfig,Config,higherPrioritySignalIndices)

mblteNPBCH

Generates NPBCH frame data.

NPBCH = MBLTENPBCH...

(FRAMECONFIG, CONFIG, SCHEDULEDDATA)

Generates NPBCH signal that will be placed into the correct resource elements.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

CONFIG is a general purpose configuration structure.

SCHEDULEDDATA is the data to transmit carrying structure.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields.

Example:

xiii

Page 98: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

% Generate NPBCH

Config = xml_read(’Config.xml’);

Config.numNpbchBits = 1600;

Config.cellID = 0;

FrameConfig = xml_read(’FrameConfig.xml’);

ScheduledData = xml_read(’ScheduledData.xml’);

ScheduledData.npbchBits = ones(1, Config.numNpbchBits);

FrameConfig.currentSubframe = 1;

npbch = mblteNpbch(FrameConfig, Config,...

ScheduledData)

B.3.6 Narrowband Physical Downlink Shared Channel

mblteNpdschSubframe

MBLTENPDSCHSUBFRAME creates a NPDSCH subframe.

[SUBFRAME, GRIDINFO] = MBLTENPDSCHSUBFRAME(CONFIG, ELEMENTTYPEVALUES, ...

FRAMECONFIG, SCHEDULEDDATA)

Generates a time-frequency grid (subframe). This specific function generates

a narrowband downlink shared channel subframe using data in SCHEDULEDDATA.

CONFIG is a general purpose configuration structure.

ELEMENTTYPEVALUES is a structure defining integer values for each signal and

channel.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

SCHEDULEDDATA is the data to transmit carrying structure.

SUBFRAME is a double matrix size subcarriers by (symbols per subframe)

carrying the actual channel time-frequency data.

GRIDINFO is a double matrix size subcarriers by (symbols per subframe)

carrying ELEMENTTYPEVALUES definitions for each resource element within the

subframe.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields.

Example:

% Generate a NPDSCH subframe.

Config = xml_read(’Config.xml’);

ElementTypeValues = xml_read(’ElementTypeValues.xml’);

FrameConfig = xml_read(’FrameConfig.xml’);

ScheduledData = xml_read(’ScheduledData.xml’);

FrameConfig.currentFrame = 1;

[subframe, gridInfo] = mblteNpdschSubframe(Config, ElementTypeValues, ...

FrameConfig, ScheduledData);

xiv

Page 99: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

mblteNPDSCHindices

MBLTENPDSCHINDICES generates indices for the NPDSCH.

INDICES = mblteNpdschIndices(FRAMECONFIG, CONFIG, SCHEDULEDDATA,

INDICESREFERENCESIGNALS) generates indices INDICES for the NPDSCH based

on the data size given in struct SCHEDULEDDATA and information contained

in structs FRAMECONFIG and CONFIG, while avoiding resurce elements

reserved for the reference signals contained in indices

INDICESREFERENCESIGNALS.The structs must include:

FRAMECONFIG:

currentSubframe - Contains the number of the current subframe.

CONFIG:

subcarriers - Gives the number of subcarriers within a

subframe.

symbols - Gives the number of symbols within a slot.

operationModeInfo - 2-bit string marks the operation mode given

by a higher layer.

eutraControlRegionSize - Marks the starting symbol for mapping data.

SCHEDULEDDATA:

dschData - Vector with data to be transmitted.

dschDataSib1Flag - Flag that marks if SIB1 is currently being

scheduled.

mblteNPDSCH

MBLTENPDSCH QPSK modulate and map data to be transmitted through the NPDSCH.

MAPPEDNPDSCH = MBLTENPDSCH(CONFIG,INDICESNPDSCH,INDATA) performs QPSK

modulation and maps shared channel’s data INDATA to resource elements in

INDICES and creates a grid with that data MAPPEDNPDSCH. Struct CONFIG

contains:

subcarriers - number of subcarriers in a subframe.

symbols - number of symbols in a slot.

B.3.7 Narrowband physical downlink control channel

mblteNpdcchSubframe

Creates a NPDCCH subframe.

[SUBFRAME, GRIDINFO] = MBLTENPDCCHSUBFRAME(CONFIG, ELEMENTTYPEVALUES,...

FRAMECONFIG, SCHEDULEDDATA)

Generates a time-frequency grid (subframe). This specific function generates

a narrowband downlink shared channel subframe using data in SCHEDULEDDATA.

CONFIG is a general purpose configuration structure.

xv

Page 100: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

ELEMENTTYPEVALUES is a structure defining integer values for each signal and

channel.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

SCHEDULEDDATA is the data to transmit carrying structure.

SUBFRAME is a double matrix size subcarriers by (symbols per subframe)

carrying the actual channel time-frequency data.

GRIDINFO is a double matrix size subcarriers by (symbols per subframe)

carrying ELEMENTTYPEVALUES definitions for each resource element within the

subframe.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields.

Example:

% Generate a NPDSCH subframe.

Config = xml_read(’Config.xml’);

ElementTypeValues = xml_read(’ElementTypeValues.xml’);

FrameConfig = xml_read(’FrameConfig.xml’);

ScheduledData = xml_read(’ScheduledData.xml’);

FrameConfig.currentFrame = 1;

[subframe, gridInfo] = mblteNpdcchSubframe(Config, ElementTypeValues, ...

FrameConfig, ScheduledData);

mblteNPDCCHindices

MBLTENPDCCHINDICES generate NPDCCH grid indices.

[INDICESNCCE0, INDICESNCCE1] = MBLTENPDCCHINDICES(INDICESHIGHERPRIORITY,

CONFIG) returns indices INDICESNCCE0 and INDICESNCCE1 for each of

the NCCEs in a NPDCCH subframe. Resource elements to be avoided are

listed as indices in INDICESHIGHERPRIORIT. Struct CONFIG must contain:

subcarriers - number of subcarriers in a subframe.

symbols - number of symbols in a slot.

operationModeInfo - two bits as a string flagging the operation mode.

If operationModeInfo is ’00’ or ’01’ then CONFIG must also have:

eutraControlRegionSize - marks the LTE control region size as a number

of slots.

Example:

% Generate NPDCCH indices.

Config = xml_read(’Config.xml’)

higherPrioritySignalIndices = [];

[indices0, indices1] = mblteNPDCCHindices(...

higherPrioritySignalIndices,Config)

xvi

Page 101: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

mblteNPDCCH

MBLTENPDCCH modulate and map DCI onto NCCE.

MAPPEDNPDCCH = MBLTENPDCCH(OPTIONNCCE, INDICESNCCE0, INDICESNCCE1, DCI,

CONFIG) the control information found in DCI is QPSK modulated and

mapped onto indices found in INDICESNCCE0 if OPTIONNCCE is set to 1,

INDICESNCCE1 if 2, or both if 3. This results in a grid MAPPEDNPDCCH.

Struct CONFIG has to include:

subcarriers - number of subcarriers in a subframe.

symbols - number of symbols in a slot.

B.3.8 Narrowband primary synchronization signal

mblteNpssSubframe

Creates a NPSS subframe.

[SUBFRAME, GRIDINFO] = ...

MBLTENPSSSUBFRAME(CONFIG, ELEMENTTYPEVALUES, FRAMECONFIG)

Generates a time-frequency grid (subframe). This specific function generates

a narrowband secondary synchronization signal subframe.

CONFIG is a general purpose configuration structure.

ELEMENTTYPEVALUES is a structure defining integer values for each signal and

channel.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

SUBFRAME is a double matrix size subcarriers by (symbols per subframe)

carrying the actual channel time-frequency data.

GRIDINFO is a double matrix size subcarriers by (symbols per subframe)

carrying ELEMENTTYPEVALUES definitions for each resource element within the

subframe.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields.

Example:

% Generate frame 0 NPSS.

Config = xml_read(’Config.xml’);

ElementTypeValues = xml_read(’ElementTypeValues.xml’);

FrameConfig = xml_read(’FrameConfig.xml’);

FrameConfig.currentFrame = 1;

[subframe, gridInfo] = mblteNpssSubframe(Config, ...

ElementTypeValues, FrameConfig);

xvii

Page 102: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

mblteNPSSindices

Generates NPSS indices.

INDICES = MBLTENPSSINDICES(FRAMECONFIG, CONFIG)

Generates resource element allocation indices for the narrowband primary

synchronization signal.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

currentSubframe - NPSS is found in subframe 5, set this to field to 6 to

use correct MATLAB notation.

CONFIG is a general purpose configuration structure requiring fields:

subcarriers - subcarriers in core system, should be set to 12

symbols - symbols per slot, should be set to 7

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on strucutre fields..

Example:

% Generate frame 0 NPSS indices.

Config = xml_read(’Config.xml’)

FrameConfig = xml_read(’FrameConfig’)

FrameConfig.currentSubframe = 6;

indices = mblteNpssIndices(FrameConfig,Config)

mblteNPSS

Generate NPSS data elements.

[NPSSSIGNAL] = MBLTENPSS(CONFIG)

Generates a signal element grid. This specific function generates

a narrowband primary synchronization signal.

CONFIG is a general purpose configuration structure.

NPSSSIGNAL is a grid containing NPSS signal double elements, size (12, 14).

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields.

Example:

% Generate NPSS signal.

Config = xml_read(’Config.xml’);

npss = mblteNpss(Config);

xviii

Page 103: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

B.3.9 Narrowband secondary synchronization signal

mblteNsssSubframe

Creates a NSSS subframe.

[SUBFRAME,GRIDINFO] = ...

MBLTENSSSSUBFRAME(CONFIG, ELEMENTTYPEVALUES, FRAMECONFIG)

Generates a time-frequency grid (subframe). This specific function generates

a narrowband secondary synchronization signal subframe.

CONFIG is a general purpose configuration structure.

ELEMENTTYPEVALUES is a structure defining integer values for each signal and

channel.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

SUBFRAME is a double matrix size subcarriers by (symbols per subframe)

carrying the actual channel time-frequency data.

GRIDINFO is a double matrix size subcarriers by (symbols per subframe)

carrying ELEMENTTYPEVALUES definitions for each resource element within the

subframe.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields..

Example:

% Generate frame 0 NSSS.

Config = xml_read(’Config.xml’);

ElementTypeValues = xml_read(’ElementTypeValues.xml’);

FrameConfig = xml_read(’FrameConfig.xml’);

FrameConfig.currentFrame = 1;

[subframe, gridInfo] = mblteNsssSubframe(Config, ElementTypeValues, ...

FrameConfig);

mblteNSSSindices

Generates NSSS indices.

INDICES = MBLTENSSSINDICES(FRAMECONFIG, CONFIG)

Generates resource element allocation indices for the narrowband secondary

synchronization signal.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

CONFIG is a general purpose configuration structure.

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields..

xix

Page 104: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

Example:

% Generate NSSS indices.

Config = xml_read(’Config.xml’)

FrameConfig = xml_read(’FrameConfig.xml’)

FrameConfig.currentFrame = 1;

FrameConfig.currentSubframe = 10;

indices = mblteNsssIndices(FrameConfig, Config)

mblteNSSS

Generate NSSS data elements.

[NSSSSIGNAL] = MBLTENSSS(FRAMECONFIG, CONFIG)

Generates a signal element grid. This specific function generates

a narrowband secondary synchronization signal.

CONFIG is a general purpose configuration structure.

FRAMECONFIG is the frame configuration structure carrying information related

the current frame and subframe.

NSSSSIGNAL is a grid containing NSSS signal double elements, size (12, 14).

AUTHORS NOTE: Please refer to MBLTE DL structure help function mblteDlStructs

for information on structure fields..

Example:

% Generate frame 0 NSSS signal.

Config = xml_read(’Config.xml’);

FrameConfig = xml_read(’FrameConfig.xml’);

FrameConfig.currentFrame = 1;

FrameConfig.currentSubframe = 1;

nsssSignal = mblteNsss(FrameConfig, Config)

B.4 Encoding and decoding

mblteConvEncode

MBLTECONVENCODE convolutionally encodes the inputData vector.

ENCODEDDATA = MBLTECONVENCODE(INPUTDATA) convolutionally encodes data in

INPUTDATA and prepares it for the rate matching. For further information

see help for function lteConvolutionalEncode.

B.4.1 Broadcast channel

mblteNPBCHOuterDecoder

MBLTENPBCHOUTERDECODER decode a scrambled sequence returning CRC-checked data

xx

Page 105: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

[DATACHECKED, CRCERROR] = MBLTENPBCHOUTERDECODER(CONTROLDL, FRAMECONFIG,

CONFIG, ENCODEDDATA) descrambles ENCODEDDATA, performs rate recovery,

decodes the codeword using Viterbi decoder, and checks the CRC for any

errors CRCERROR. The decoded DATACHECKED is then returned and can be

considered error-free if CRCERROR equals 0. The structs CONTROLDL,

FRAMECONFIG and CONFIG must contain:

CONTROLDL:

bchDescramblingFixP - fixed point to be used for descrambling if set

to ’1’.

bchDescramblingType - three bits, from MSB: ’1’ if signed, word

length setting, and fraction length.

bchDescramblingMex - ’1’ if MEX used.

bchRateRecoverFixP - fixed point to be used for rate recovery if set

to ’1’.

bchRateRecoverType - three bits, from MSB: ’1’ if signed, word

length setting, and fraction length.

bchViterbiFixP - fixed point to be used by Viterbi if set to ’1’.

bchViterbiType - three bits, from MSB: ’1’ if signed, word

length setting, and fraction length.

FRAMECONFIG:

currentFrame - current frame number.

CONFIG:

cellID - narrowband cell ID.

numNpbchBits - number of bits transmitted through NPBCH.

Antennas - number of transmit antennas (1 or 2).

B.4.2 Downlink shared channel

mblteDSCHEncode

MBLTEDSCHENCODE encodes, rate matches and scrambles data.

SCRAMBLEDDATA = MBLTEDSCHENCODE(LENGTHRATEMATCHING, NFRAME, NSLOT,

CONFIG, NREPETITIONS, INDATA) uses CRC and convolutional

encoding to encode INDATA. Afterwards rate matches the encoded data to

transport block size LENGTHRATEMATCHING and scrambles with a sequence

initiated with frame NFRAME with the first frame being frame 1, slot

NSLOT and information contained in struct CONFIG, returning scrambled

and encoded data SCRAMBLEDDATA. Wanted part of the scrambling sequence

is chosen using number of transmissions NTRANSMISSION. CONFIG has to

contain:

RNTI_NPDSCH - NPDSCH-specific RNTI.

mblteNpdschDescrambling

MBLTENPDSCHDESCRAMBLING descrambles NPDSCH.

xxi

Page 106: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

DESCRAMBLEDDATA = MBLTENPDSCHDESCRAMBLING(CONTROLDL, NREPETITIONS,

NSLOT, CONFIG, NFRAME, INDATA) returns descrambled data DESCRAMBLEDDATA

from input data vector INDATA. NREPETITIONS is the current transmission

repetition number (inclusive the original transmission), NSLOT and

NFRAME are the starting slot and frame, respectively, for scrambling.

Structs CONTROLDL and CONFIG must include the following fields.

CONTROLDL:

dschDescramblingFixP - fixed point to be used if set to ’1’.

dschDescramblingType - three bits, from MSB: ’1’ if signed, word

length setting, and fraction length.

dschDescramblingMex - ’1’ if MEX used.

CONFIG:

RNTI_NPDSCH - RNTI value associated with NPDSCH.

cellID - narrowband cell ID.

mblteNPDSCHOuterDecoder

mblteNpdschOuterDecoder decodes a scrambled NPDSCH sequence.

[CHECKEDDATA, ERRORCRC] = mblteNpdschOuterDecoder(CONTROLDL, NTRANSMISSION,

NFRAME, NSLOT, CONFIG, CODEBLOCKLENGTH, ENCODEDDATA) descrambles

ENCODEDDATA using the current slot NSLOT and current frame NFRAME.

Convolutional rate recovery is then applied, with output length equal to

CODEBLOCKLENGTH (transport block length + CRC), and correct part of

the sequence chosen according to the number of transmissions

NTRANSMISSION. This is then decoded using Viterbi decoder and CRC checked.

If output ERRORCRC differs from 0 then there are errors in data output

CHECKEDDATA that occurred during transmission. Structs CONTROLDL

and CONFIG must contain:

CONTROLDL:

dschDescramblingFixP - fixed point to be used for descrambling if set

to ’1’.

dschDescramblingType - three bits, from MSB: ’1’ if signed, word

length setting, and fraction length.

dschDescramblingMex - ’1’ if MEX used.

dschRateRecoverFixP - fixed point to be used for rate recovery if set

to ’1’.

dschRateRecoverType - three bits, from MSB: ’1’ if signed, word

length setting, and fraction length.

dschViterbiFixP - fixed point to be used by Viterbi if set to ’1’.

dschViterbiType - three bits, from MSB: ’1’ if signed, word

length setting, and fraction length.

CONFIG:

n_RNTI - RNTI value associated with NPDSCH.

cellID - narrowband cell ID.

xxii

Page 107: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

B.4.3 Narrowband physical downlink control channel

mblteDCCHEncode

MBLTEDCCHENCODE CRC and convolutionally encodes, rate matches and scrambles DCI.

SCRAMBLEDDATA = MBLTEDCCHENCODE(LENGTHRATEMATCHING, NSLOT, CONFIG,

INDATA) INDATA is CRC encoded, CRC scrambled with mask corresponding to

the current port, convolutionally encoded, rate matched to length

LENGTHRATEMATCHING, and scrambled using the current slot NSLOT and

information in the struct CONFIG. CONFIG must include:

RNTI - RNTI value as a binary vector.

CurrentPort - the current antenna port.

cellID - narrowband cell-ID.

mblteNPDCCHOuterDecoder

MBLTENPDCCHOUTERDECODER decodes a scrambled sequence, returning CRC-checked data.

[CHECKEDDATA, ERRORCRC] = MBLTENPDCCHOUTERDECODER(CONTROLDL, NSLOT,

CONFIG, CODEBLOCKLENGTH, ENCODEDATA) descrambles ENCODEDATA, rate

recovers it to the length specified in CODEBLOCKLENGTH, decodes using

Viterbi, and checks the CRC, returning the decoded DCI CHECKEDDATA and

eventual errors in ERRORCRC. NSLOT is the current slot number. Structs

CONTROLDL and CONFIG must contain:

CONTROLDL:

dschDescramblingFixP - fixed point to be used for descrambling if set

to ’1’.

dschDescramblingType - three bits, from MSB: ’1’ if signed, word

length setting, and fraction length.

dschDescramblingMex - ’1’ if MEX used.

dschRateRecoverFixP - fixed point to be used for rate recovery if set

to ’1’.

dschRateRecoverType - three bits, from MSB: ’1’ if signed, word

length setting, and fraction length.

dcchViterbiFixP - fixed point to be used by Viterbi if set to ’1’.

dcchViterbiType - three bits, from MSB: ’1’ if signed, word

length setting, and fraction length.

CONFIG:

RNTI - RNTI vector with all 16 RNTI values.

cellID - narrowband cell ID.

mblteDCI

MBLTEDCI constructs DCI information to be sent over the NPDCCH.

BITS = MBLTEDCI(ENB) returns a vector with DCI that is sent over

the NPDCCH. It is constructed from the input structure ENB. ENB must

xxiii

Page 108: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

contain all the non-reserved data from one of the following formats:

DCI format N1:

DCIFormat - ’FormatN1’, indicates format used.

RandomAccess - 0 or 1, flags if random access procedure is

initiated.

In case of random access procedure:

NPRACHRep - starting number of NPRACH repetitions.

NPRACHSubcInd - subcarrier indication of NPRACH.

If no random access procedure:

SchedDelay - scheduling delay k0 value.

Rmax - maximum number of repetitions.

NrOfSubframes - number of subframes, 1-10.

TranspBlkSize - size of the transport block.

RepNumber - number of repetitions.

newData - 0 or 1, new data flag.

HARQACK - HARQ-ACK message.

DCIRep - number of DCI subframe repetitions.

% Sample construction:

ENB.DCIFormat = ’FormatN1’;

ENB.RandomAccess = 0;

ENB.SchedDelay = 12; % placeholder

ENB.Rmax = 8; % placeholder

ENB.NrOfSubframes = 10;

ENB.TranspBlkSize = 680;

ENB.RepNumber = 1; % placeholder

ENB.newData = 0; % placeholder

ENB.HARQACK = 15; % placeholder.

ENB.DCIRep = 2; % placeholder

B.5 OFDM modulation and demodulation

mblteOFDMModulate

MBLTEOFDMMODULATE modulates an OFDM symbol for transmission.

MODULATEDDATA = MBLTEOFDMMODULATE(FREQUENCYDATA, NSYMBOL)

returns modulated symbol MODULATEDDATA from input symbol

FREQUENCYDATA. The modulation process includes zero padding,

IFFT, upsampling by 8, and CP addition. NYSMBOL is the symbol

number within the slot, from 0 to 6.

xxiv

Page 109: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

mblteOFDMDemodulate

MBLTEOFDMDEMODULATE demodulates a received OFDM symbol.

DEMODULATEDDATA = MBLTEOFDMDEMODULATE(CONTROLDL, TIMEDATA, NSYMBOL)

returns demodulated symbol DEMODULATEDDATA from input OFDM symbol

TIMEDATA. The demodulation process includes CP removal, downsampling

by 8, FFT and padding removal. nSymbol is the symbol number within

the slot, from 0 to 6. CONTROLDL is a struct that has to include:

channelFftFixP - flags if fixed point is to be used.

channelFftMex - flags if MEX is to be used.

B.6 Channel estimation and equalisation

mblteNoiseEstimate

MBLTENOISEESTIMATE calculates a noise estimate for a specific custom channel.

NOISE = mblteMmseNoiseEstimate(CONFIG) returns NOISE value to

approximate white Gaussian noise added in a specific channel, based on

the signal’s signal-to-noise ratio.

mblteEstimateChannel

MBLTEESTIMATECHANNEL estimates channel values from pilots.

ESTIMATEDCHANNEL = MBLTEESTIMATECHANNEL(SIGNALEXPECTED, SIGNALRECEIVED,

NOISE) compares signal in the received sequence SIGNALRECEIVED corrected

for NOISE with the known sequence values SIGNALEXPECTED, and returns

the channel estimate ESTIMATEDCHANNEL.

B.6.1 mblteInterpolationEqualizer

MBLTEINTERPOLATIONEQUALIZER equalises data using pilot interpolation.

EQUALIZEDDATA = MBLTEINTERPOLATIONEQUALIZER(ESTIMATEDCHANNEL, TAPINDICES,

DATAINPUT, DATAINDICES, CONFIG) uses channel estimates, ESTIMATEDCHANNEL,

and their indices, TAPINDICES, to create a grid of averaged and

interpolated channel estimates. They are then used to estimate the true

data values from DATAINPUT at the indices DATAINDICES. Struct CONFIG has

to include:

subcarriers - number of subcarriers in a subframe.

symbols - number of symbols in a slot.

mblteSectorEqualizer

MBLTESECTOREQUALIZER equalizes data using sectors around pilots

xxv

Page 110: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

EQUALIZEDDATA = MBLTESECTOREQUALIZER(ESTIMATEDCHANNEL, TAPINDICES,

DATAINPUT, DATAINDICES, CONFIG) a number of equal-sized sectors equal to

the number of channel estimates ESTIMATEDCHANNEL within the subframe is

created. To each of the sectors a value of ESTIMATEDCHANNEL correspon-

ding to the coordinates found in TAPINDICES is bound, creating a sub-

frame-sized grid containing ESTIMATEDCHANNEL. A grid of the same size is

then constructed using DATAINPUT and its DATAINDICES, and then equalised

using the ESTIMATEDCHANNEL-grid, returning EQUALIZED data. The struct

CONFIG must include:

subcarriers - number of subcarriers in a subframe.

symbols - number of symbols in a slot.

C QPSK constellation diagrams

-10 -8 -6 -4 -2 0 2 4 6 8 10

In phase

-10

-5

0

5

10

15

Qua

drat

ure

Interpolation EQ after multipath fading

Signal before EQSignal after EQPerfect QPSK locations

Figure C.1

xxvi

Page 111: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

-1.5 -1 -0.5 0 0.5 1 1.5

In phase

-1

-0.5

0

0.5

1

1.5

Qua

drat

ure

Interpolation EQ after multipath fading

Signal before EQSignal after EQPerfect QPSK locations

Figure C.2

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

In phase

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

Qua

drat

ure

Sector EQ after multipath fading

Signal before EQSignal after EQPerfect QPSK locations

Figure C.3

xxvii

Page 112: Wireless system design - DiVA portal1083434/...Wireless system design: NB-IoT downlink simulator Douglas Troha, Piotr Krasowski The newly defined NB-IoT standard currently lacks a

-1.5 -1 -0.5 0 0.5 1 1.5

In phase

-1.5

-1

-0.5

0

0.5

1

1.5

Qua

drat

ure

Sector EQ after multipath fading

Signal before EQSignal after EQPerfect QPSK locations

Figure C.4

xxviii