Documente Academic
Documente Profesional
Documente Cultură
Defined Radio
Erik Persson
Lule
a University of Technology
2013-06-08
Abstract
Synchronizing a mobile device to the host system is an important feature for all
mobile communication systems. In WCDMA, a Radio Access Technology (RAT)
used in a third generation mobile telecommunication system called UMTS, the synchronisation process is divided in a number of steps. This thesis project covers
the necessary steps in order to synchronise and receive broadcast messages from a
WCDMA radio base station by creating a software WCDMA receiver capable of
tuning in on WCDMA radio base stations, finding radio frames, detecting coding
schemes used by the base station and finally being able to capture and decode broadcast messages transmitted by the base station and in the meantime also evaluate
the usage of software defined radio within WCDMA.
This involves performing tasks traditionally performed in hardware such as processing signals, detecting slot and frame boundaries, descrambling, performing phase
compensation, detecting scrambling codes, decoding channels, decoding convolutionally encoded bit strings, performing CRC calculations and much more in order to
turn the signal received by a universal software radio peripheral into decoded bits.
This thesis project was carried out, in-house at Neava AB in Lule
a, Sweden.
Preface
For me, studying WCDMA with Software Defined Radio has been an interesting journey,
coming from a background with no previous knowledge in signal processing or radio
technology. I want to thank Staffan Johansson at Neava AB for offering me the chance
of playing around with this technology and the rest of the Neava staff for helping me
out during this project. I would also like to thank my wife and kids for their patience
and support.
Contents
1
Introduction
Method
2.1 Tools
2.1.1
2.1.2
2.1.3
.
.
.
.
2
2
2
3
3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5
5
5
6
7
7
7
7
7
7
8
8
8
9
9
10
11
11
12
12
12
13
13
13
13
13
and hardware . . . . . .
Software Defined Radio
GNU Radio . . . . . . .
USRP N210 . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
RSSI scan
15
Synchronisation
16
5.1 Slot synchronisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 Frame synchronisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3 Scrambling code identification . . . . . . . . . . . . . . . . . . . . . . . . . 18
Phase rotation
19
20
22
22
23
23
24
25
26
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Implementation
27
9.1 Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
9.2 GNU Radio blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
9.3 Fitting it all together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
10 Results
10.1 Receiver performance . . . . . . . . . .
10.2 Implementation discussion and details
10.3 Conclusions and discussion . . . . . .
10.4 Future work . . . . . . . . . . . . . . .
10.5 Lessons learned . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
30
30
33
34
34
35
11 Abbreviations
36
References
37
2013-06-08
1 Introduction
Mobile communication involves huge computational demands, especially for the physical
layer. As a result of this, the physical layer algorithms are often realised onto specially
designed hardware, eg. ASICs (Application Specific Integrated Circuits), built for a
specific physical layer protocol. As mobile communication evolves, the complexity- and
the amount- of physical layer protocols are increasing. Mobile devices, often light weight
hand-held terminals with limited power supplies, are facing an increased demand to
support an increasing amount of protocol stacks. From this, the idea of performing
parts- and/or all- of the physical layer operations in software started to arise, and so the
first ideas of Software Defined Radio [1] (SDR) were born.
SDR offers a low cost solution to research and development within the field of radio
technology. SDR enables development of radio receivers and/or transmitters without the
requirement of creating new specially designed hardware. The benefits of SDR makes
the technique well suited for use in studying different physical layer protocols.
A key functionality within all physical layer protocols is to synchronize a mobile
device to the host system. In WCDMA [2][3] (the Radio Access Technology (RAT)
used within UMTS; a 3rd generation telecommunication system) being synchronized
means to be able to read the broadcast messages transmitted by a Radio Base Station
(RBS)/WCDMA cell.
The synchronisation is performed in a number of steps. The first step is to locate
any possible cells within a set of frequency bands. This is done by performing a RSSI
(Received Signal Strength Indicator) scan. When a candidate cell has been detected the
synchronisation is performed in three steps: Slot synchronisation, Frame synchronisation
and Scrambling code identification. First when these steps have been carried out the
mobile device can try to read the broadcast messages transmitted by the cell.
In this thesis project the goals are to evaluate the usage of Software Defined Radio for use in mobile communication. This should be done by creating software for a
Universal Software Radio Peripheral in order to synchronize against WCDMA cells. By
being synchronized means, to be able to read the broadcast messages transmitted from
a base-station. This document describes UMTS and WCDMA systems in short, the
synchronisation process, channel decoding and the software implementation done during
this thesis project. The focus will be on the physical layer of WCDMA [4][5][6][7][8][9].
The intention with this report is not to explain SDR in detail since others have already
done this [1][12].
The software radio device used in this thesis is an USRP N210 from Ettus Research [11] which is used together with the GNU Radio software [10].
This thesis project were done in-house at Neava AB, in Lule
a, Sweden. Neava is a
software company mainly focusing on embedded real time systems within the sector of
mobile telecommunications.
1(38)
2013-06-08
2 Method
The work done during this thesis project were divided into three phases:
Pre-studies - Literature studies in order to get a grip of the subject. Literature
used were Convergence Technologies for 3G Networks IP, UMTS, EGPRS and
ATM, [2] and WCDMA Design Handbook, [3]. These two books were used in
order to write the section Introduction to WCDMA (Sec. 3). Parts of the 3GPP
specifications [4][5][6][7][8][9][18] have also been studied, but mostly during the
implementation phase. The 3GPP specification were also used in order to write
the more technically detailed sections of the report.
Implementation - The implementation phase involved implementing a software radio receiver for synchronizing against WCDMA cells, using GNU radio, C++ and
Python. It also involved generating the radio signals in order to verify the implementation of the receiver.
Report writing - The writing of the report has been a constant process during the
entire project and the structure of the report mainly follows the structure of the
workflow.
In short, SDR (Software Defined Radio) is often described as the technique of getting
code as close to the antenna as possible. It turns radio hardware problems into software problems. In reality it means that parts of the radio receiver/transmitter chain
has been replaced by software. A more technical definition of SDR is defined by The
Wireless Innovation Forum[13], where differences are made between software controlledand software defined- radio, and is as follows (SDRF Cognitive Radio Definitions[14]):
Software Controlled
Software controlled refers to the use of software processing within the radio system
or device to select the parameters of operation.
Software Defined
Software defined refers to the use of software processing within the radio system
or device to implement operating (but not control) functions.
Software Controlled Radio
Radio in which some or all of the physical layer functions are Software Controlled.
2(38)
2013-06-08
GNU Radio
GNU radio is an open source software development toolkit for creating signal processing
software. Basically it consists of signal processing blocks that can be combined into
flow charts that processes signals. The signal processing blocks are written in C++ and
Python code is used in order to combine the blocks into flow charts. It comes with a set
of signal processing blocks for common signal processing tasks and new blocks are easily
written in C++ by extending the predefined classes.
GNU Radio also includes a graphical tool, GNU Radio Companion (Fig. 1), with
which flowcharts can be created by dragging and dropping signal processing blocks. The
tool then creates the python code that combines the signal processing blocks.
For more information about GNU Radio and installation instructions see:
http://www.gnuradio.org[10]
2.1.3
USRP N210
The USRP N210 device from Ettus Research LLC is a device for receiving and transmitting radio signals using a computer with a Gigabit Ethernet connection. Various
3(38)
2013-06-08
daughter boards can be plugged in, in order to use the device on different frequency
bands. The entire design of the hardware is open source, including the daughter boards.
The device can be tuned in on different carrier frequencies and sampling rates. It
performs the downscaling of the signal from the specified carrier frequency down to
baseband. The signal is then sampled at the specified sampling rate and the samples are
transmitted over the Gigabit Ethernet interface to a computer for further processing.
The N210 can be used together with GNU Radio, for more information and installation instruction see http://www.ettus.com[11]
USRP N210 SDR specification (from Ettus Research web page [11], 2011-08-17)
50 MHz of instantaneous RF bandwidth
Gigabit Ethernet connectivity
MIMO capable - Requires two or more USRP N210 devices as motherboard has
one daughterboard slot
Onboard FPGA processing
FPGA: Xilinx Spartan XC3SD3400A
ADCs: 14-bits 100 MS/s
DACs: 16-bits 400 MS/s
Ability to lock to external 5 or 10 MHz clock reference
TCXO Frequency Reference ( 2.5ppm)
Optional internal GPS locked reference oscillator
R ISE
R
FPGA code can only be changed with the paid version of the Xilinx
Design Suite tools
The device used for receiving and sample the signals is an USRP N210 from Ettus
Research LLC with WBX daughter boards having a coverage of 50 MHz to 2.2 GHz.
4(38)
2013-06-08
3.1 UMTS
Universal Mobile Telecommunications System (UMTS) is the name of a third generation
(3G) telecommunication system that is being defined by the 3rd Generation Partnership
Project (3GPP). UMTS consists of two Radio Access Technologies (RATs), WCDMA
and GSM/EDGE, where GSM/EDGE is an evolved version of the 2G GSM system.
3.2 WCDMA
WCDMA (Wideband Code Division Multiple Access) is one of the RATs used in UMTS
networks for communication between UEs and RBSs. WCDMA exists in two different
forms FDD (Frequency Division Duplex) and in TDD (Time Division Duplex). In FDD
5(38)
2013-06-08
the uplink (UL) and downlink (DL) are separated by frequency, compared to TDD where
the UL and DL are separated in the time domain. Throughout this document when
referring to WCDMA it means WCDMA FDD, unless WCDMA TDD is specifically
stated.
When sending signals through a shared physical medium, as the radio air interface,
it is important to separate different signals or streams of data from each other. There
exists numerous different techniques for doing this. CDMA, FDMA and TDMA are
probably some of the most common ways of dividing a shared medium between different
users. As the name implies, WCDMA is based on CDMA, performed in wideband.
FDMA - Frequency Division Multiple Access, divides the frequency usage between
the different users.
TDMA - Time Division Multiple Access, the shared medium is divided in the time
domain between the different users.
CDMA - Code Division Multiple Access, separates the different signals by encoding
them with special codes.
6(38)
3.3.1
2013-06-08
RRC
The radio resource control (RRC) layer is responsible of establishing, maintaining and
releasing radio resource connections between the UE and the CN. The RRC controls the
lower layers of the WCDMA stack.
3.3.2
RLC
The radio link control (RLC) layer provides transport services between RLC entities in
the UE and in the RNC. Three modes are supported: transparent, unacknowledged and
acknowledged. In transparent mode the RLC passes packets directly without adding
any extra header information. This requires that the packets being sent is of appropriate size. In unacknowledged mode the RLC passes packets onwards without ensuring
delivery. The data can be concatenate and padded in order to fit appropriate packet
size. Unacknowledged mode also contains some ciphering functionality. The acknowledged mode provides the same services as the unacknowledged mode with the addition
of retransmission control, discarding of duplicated packets and in sequence delivery.
3.3.3
MAC
The medium access control (MAC) layer is responsible of mapping logical channels onto
transport channels. This mapping can change dynamically as the characteristics of
the network or the user changes. The MAC layer is also responsible of reporting the
bandwidth usage back to RRC.
3.3.4
PHY
PHY, the physical layer, is responsible mapping transport channels onto physical channels and the transmission/reception of the physical channels over the air interface. The
physical layer also deliver measurement reports back to the RRC.
7(38)
2013-06-08
complex plane, often referred to as the I/Q plane. Each sample consists of one real part,
I, and one imaginary part Q. Figure 4 illustrates how the amplitude and phase maps
to the I and Q parts. For further reading on IQ signals the web tutorial: What is I/Q
Data? from National Instruments is recommended [15].
Correlation
Correlation [17] is widely used within WCDMA as a matching filter. The following formula is used for correlation of two sequences, s1 and s2 , where s1 [k] and s2 [k] corresponds
to the (k + 1):th value of the respective sequence:
R[m] =
N
1
X
i=0
s1 , s2 [n]
2013-06-08
ease the detection of the slots boundaries. According to [7] the PSC is constructed as a
so-called generalised hierarchical Golay sequence and is constructed to have good autocorrelation properties, in short meaning that it will generate large peaks when perfectly
aligned and correlated against itself and almost no peak otherwise.
The PSC is defined as:
a = [x1 , x2 , x3 , ..., x16 ]
= [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
P SC = (1 + j)[a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a]
3.6.3
The secondary synchronisation codes (SSC) are transmitted on the secondary synchronisation channel (S-SCH) at the first 256 chips of each slot. There exists 16 different
SSCs and they are used to create the 64 different S-SCH sequences defined by the 3GPP.
The purpose of the S-SCH is to ease the detection of the frame boundaries and also to
identify what scrambling code group that a particular cell belongs to.
The SSCs {SSC1 , SSC2 , ..., SSC16 } are constructed by combining a set of so-called
Hadamard sequences with the sequence z defined as:
z = [b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b]
b = [x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12 , x13 , x14 , x15 , x16 ]
where {x1 , x2 , ..., x16 } are the same as the {x1 , x2 , ..., x16 } used in the definition of the
PSC in the previous section.
SSCk = (1 + j) [z(0)hk (0), z(1)hk (1), z(2)hk (2), z(3)hk (3), ..., z(255)hk (255)]
for 1 k 16 where hk (i) denotes the i:th symobol of the k:th Hadamard sequence and
z(i), the i:th symbol of the z sequence.
The Hadamard sequences are obtained from the rows of a recursively created matrix,
H8 , defined as:
H0 = 1
"
Hj
Hj1 Hj1
Hj1 Hj1
, j > 0.
Finally hk is defined as hk = H8 (16 (k 1)), where H8 (i) denotes the i:th row from
the matrix H8 .
3.6.4
Channelisation codes
The purpose of the channelisation codes are to spread and separate the different channels
transmitted from a RBS or a UE. One important property of channelisation codes are
orthogonality, meaning that the sum of the position wise multiplication of two codes is
9(38)
2013-06-08
where Cin {+1, 1}, Cjn {+1, 1}, 0 n N 1 and N defines the chip length of
each code. The codes are orthogonal to each other if the following statement holds:
N
1
X
n=0
Cin Cjn =
0
N
i 6= j
.
i=j
The codes are created from a so-called orthogonal variable spreading factor (OVSF)
three see Fig.5. The set of codes generated from the OVSF tree contains the same
orthogonal codes as codes generated using Hadamard or Walsh codes, the differences
comes from how they are indexed.
Figure 5: An Orthogonal Variable Spreading Factor Tree (OVSF-Tree). In the bit strings
defining the OVSF codes a 0 represents +1 and a 1 represents -1.
3.6.5
Scrambling codes
The scrambling codes are used to separate the signals from multiple RBSs or UEs transmitting at the same frequency. The scrambling sequence is a pseudo random noise
sequence which, by its own, appears as white noise. The properties of the scrambling
codes are, large impulse response when cross-correlated against itself and small when
correlated against any of the other scrambling codes.
10(38)
2013-06-08
The scrambling codes are divided into 512 sets each containing one primary and
fifteen secondary codes. The codes are pseudo random noise sequences and built from
a set of Gold sequences Zn , n = {0, 1, 2, ..., 218 2}, which are generated from two so
called m-sequences x and y. The x and y m-sequences and the Gold sequences Zn are
recursively defined as:
x(i + 18) = (x(i + 7) + x(i)) mod 2,
y(i + 18) = (y(i + 10) + y(i + 7) + y(i + 5) + y(i)) mod 2,
zn (i) = (x((i + n) mod (218 1)) + y(i)) mod 2,
i = {0, 1, 2, ..., 218 20},
n = {0, 1, 2, ..., 218 2},
with the following starting conditions for x and y as:
x(0) = 1,
x({1, 2, ..., 17}) = 0,
y({0, 1, 2, ..., 17}) = 1
The scrambling codes Sn are then finally defined as:
Sn (i) = Zn (i) + jZn ((i + 131072) mod (218 1)),
where i = {0, 1, ..., 38399} and n = 16 m + k where m defines the scrambling code set
from 0..511 and k is equal to zero for primary scrambling codes and else in the range
from 1 to 15 for the secondary scrambling codes.
Figure 6: The modulation pipeline from bits to antenna for a single channel
3.7.1
IQ modulation
In the process of IQ modulation, bits are turned into complex symbols. The symbols
are produced by dividing the two dimensional IQ space into regions (constellations) representing symbols, where each symbol represents a bit pattern. In QPSK (Quadrature
11(38)
2013-06-08
phase-shift keying), which is one of the modulation schemes used in WCDMA, the two
dimensional space is divided along the two axes, I and Q, into four regions each representing two bits (00, 01, 11, 10). The diagram in Figure 7 illustrates the mapping from bits
to symbols for QPSK. Notice that gray-coding is often preferred when mapping bits to
symbol constellations, this in order to minimize bit errors caused by symbols wrongfully
ending up in a neighbour constellation on the receiver side due to interference.
3.7.2
Spreading
In the spreading process the channelisation code is applied on the symbols. Each symbol
is multiplied with each chip in the spreading code.
D = S Cch,s,c = S [Cch,s,c (0), ..., Cch,s,c (s 1)]; s > 0,
where S is the complex symbol, Cch,s,c is the channelisation code from the OSVF tree
with spreading factor s and code number c and Cch,s,c (n) refers to the n:th chip in
the sequence Cch,s,c . The result D is a sequence of chips with the same length as the
spreading factor s of the spreading code Cch,s,c .
3.7.3
Scrambling
The scrambling process multiplies the chips from the spreading process with the scrambling code. The scrambling code is aligned with the PCCPCH frame start.
3.7.4
Pulse shaping
For pulse shaping a root raised cosine (RRC) filter is used with a roll-off factor of 0.22.
The purpose of the RRC filter is to reduce inter symbol interference.
12(38)
2013-06-08
3.8 Channels
The channels used in WCDMA are divided into three layers: logical-, transport- and
physical- channels . The logical channels mainly carries NAS data and are mapped
onto transport channels. The transport channels are then carried over the air interface
by the physical channels. This section describes the downlink physical channels [5] used
throughout this thesis project. Figure 8 contains a chart of the physical channels covered
in this section and their alignment.
3.8.1
P-SCH
The primary synchronisation channel (P-SCH) transmits the PSC each first 256 chips of
every slot. This channel is not spread or scrambled with channelisation and scrambling
codes.
3.8.2
S-SCH
The secondary synchronisation channel (S-SCH) transmits a predefined repetitive sequence of 15 SSCs each one transmitted on the first 256 chips of every slot. This
channel is not spread or scrambled with channelisation and scrambling codes.
3.8.3
CPICH
The Common pilot channel (CPICH) carries pilot information used by the UE to identify
the scrambling code of the RBS. It is also used for detecting the phase rotation (Sec. 6)
and for measuring the signal quality. All symbols on the CPICH channel contains IQ
data of (1+1j). The CPICH uses channelisation code Cch,256,0 [7]
3.8.4
PCCPCH
Primary common control physical channel (PCCPCH) carries the broadcast transport
channel (BCH), which in terms carries the broadcast control channel (BCCH). PCCPCH
13(38)
2013-06-08
uses QPSK modulation and channelisation code Cch,256,1 [7]. No information is transmitted the first 256 chips of every slot on PCCPCH.
14(38)
2013-06-08
4 RSSI scan
A RSSI scan (received signal strength indicator scan) is performed by measuring the
energy on a set of frequencies. Frequencies with higher energy levels are potentially
better candidates for containing a WCDMA cell. The RSSI measurements done in this
thesis is done by calculating the squared magnitude of the received IQ samples.
15(38)
2013-06-08
5 Synchronisation
This section describes the synchronisation process, derived from the cell search procedure
in [8]. The process is divided into three parts: slot synchronisation, frame synchronisation and scrambling code identification. It is however possible to identify the scrambling
code and find slot and frame synchronisation without the first two steps but it makes the
process much more complex in terms of computational complexity. Correlating all 512
primary scrambling codes against the received signal, measuring which one producing
the largest response on every chip over at least an entire frame would simply be too
time consuming. The first steps in the synchronisation procedure eliminates the set of
possible scrambling codes down to eight and also detects the frame boundaries so that
each possible scrambling code only needs to be correlated using one correlation offset
that matches a frame boundary.
Figure 9: Illustration of the magnitude of the correlation (|R[m]|) of the PSC against
the received signal and its usage in order to detect the slot boundaries.
2013-06-08
Figure 10: Illustration of the SSC correlation result and the identified SSC sequence.
defines the scrambling code group. At this point, the start of the received SSC sequence
is unknown, therefore it needs to be rotated and for each iteration it needs to be checked
against each row of the SSC sequence table. The newly found start of the SSC sequence
defines the start of the frame boundaries and the row from the SSC sequence table
defines what scrambling code group that the cell belongs to, see Figure 11.
Figure 11: The detected SSC sequence is measured against the SSC sequence table
defined in [7], containing all the valid SSC sequences.
Since the slot boundaries should be known by the previous step in the synchronisation
process, the 16 SSCs only needs to be correlated against the first 256 chip in every slot,
giving 16 correlations each slot.
17(38)
2013-06-08
18(38)
2013-06-08
6 Phase rotation
When a signal propagates through the air it gets distorted in a couple of ways. One
phenomena is phase rotation. Phase rotation may occur as an effect of a frequency error
in the receiver. Phase rotation is also necessary, since without any pilot information, the
reference phase is unknown on the receiver side.
The CPICH channel may be used in order to deal with phase rotation, since a known
signal (1 + j) is constantly being transmitted on the CPICH channel. The difference
between the phase of the received CPICH channel and the expected phase (1 + j) can
be calculated and used in order to rotate the signal back into the correct phase, see
Figure 12.
Figure 12: The phase difference d between a received chip R, from the CPICH channel,
and its expected position (1 + j)
19(38)
2013-06-08
Figure 13: The different processing blocks for transforming the signal into bits for one
channel in WCDMA
Section 3.7 describes in short how bits are modulated into a signal that gets transmitted over the radio air interface. This section describes the necessary steps for doing
the reverse operation of transforming the signal into bits for a particular channel.
The required steps are the following, Table 1 contains a listing of the definitions used
and Figure 13 displays a flowchart of the process (Note that this description is based
on a sample rate equal to the chip rate, for higher sample rates the WCDMA codes
should be spread with a factor equal to the multiple of the chip rate that is used for the
sampling rate. This is necessary in order to align the codes correctly with the received
signal):
Table 1: Definitions
Symbols
Cscr,q (i)
Cch,a,b
x
Explanation
The i:th chip of the primary scrambling code number q
The channelisation code number b with spreading factor a from the OVSF-tree
The complex conjugate of x
1. Sample the received signal and perform pulse shaping with a raised root cosine
filter with a roll-off factor of 0.22 producing the samples R0 (n) where n defines the
chip number and R0 (0) is the first chip in a frame.
2. De-scramble the signal by chip-wise multiplication of the complex conjugate of the
identified scrambling code (Cscr,q ) against the chips in R0 (n)
R1 (n) = Cscr,q
(n mod 38400)R0 (n).
3. De-spread the signal by calculating the sum of the chip wise multiplication of the
channelisation code Cch,a,b for the wanted channel with the chips, R1 (n) received
from step 2, with spreading factor a and channelisation code b
R2 (n1 ) =
a1
X
i=0
20(38)
2013-06-08
4. At this step it would be possible to measure the phase difference for the CPICH
(see Section 6). If phase rotation has occurred the signal needs to be rotated back
in order to decode the other channels. Taking the symbols in R2 (n1 ) as input
and correct the phase against the CPICH producing the phase corrected symbols,
R3 (n1 ) as output.
5. Map the chips R3 (n1 ) from symbols to bits. Different channels may use different
modulation techniques. For PCCPCH which carries the BCH QPSK is used (see
Section 3.7.1).
6. Done, a sequence of bits can now be obtained for a specific channel.
21(38)
2013-06-08
Figure 14: The different steps in mapping the BCCH onto PCCPCH
2013-06-08
4. Bit interleaving.
5. Data is passed onwards to the PCCPCH.
23(38)
2013-06-08
Figure 16: The half rate convolutional encoder used in WCDMA. Output bits are ordered
as Output 0, Output 1, Output 0, Output 1,..., Output 0, Output 1
24(38)
2013-06-08
Figure 18: A Trellis diagram displaying the correct path and all invalid paths starting
at state 00
8.5 Interleaving
A property of convolutionally encoded bit strings are that the decoder works better
if the errors that may have been introduced into the bit string are somewhat evenly
distributed [21]. Therefore a set of bit interleaving operations are applied before the
encoded blocks are transmitted over the air. The BCH is transmitted over two radio
frames and the first interleaver spreads equally many bits from each radio frame to the
other by using the following formula on each BCH encoded code block:
The output bits from the convolution coder, for each encoded code block, are denoted
as bn where n = 1, 2, 3, ... , i where i is the number of output bits produced by the
convolution coder for one code block, for BCH i = 540. A R1 C1 matrix M1 where
R1 = 270 and C1 = 2 is filled with the bits bn row by row.
M1 =
b1
b2
b3
b4
b5
b6
...
...
b539 b540
The first interleaving step then outputs the bits column by column: b1 , b3 , b5 , ... ,
b539 , b2 , b4 , b6 , ... , b540 , where the first 270 bits belongs to the first radio frame in the
TTI and the second 270 bits belongs to the second radio frame in the TTI.
The second interleaving step spreads the bits within each radio frame. For bits from the
BCH the following formula is used:
Let the bits in each radio frame sent to the second interleaving step be denoted as
cn where n = 1, 2, 3, ... , j where j = 270. A R2 C2 matrix M2 where R2 = 9 and
C2 = 30 is filled with the bits cn row by row.
M2 =
c1
c2
c3
c61 c62 c63
c91 c92 c93
...
...
...
c241 c242 c243
25(38)
... c30
... c60
... c90
... ...
... c270
2013-06-08
A new matrix M2p is then defined as an inter column permutation of the matrix M2
according to the following pattern:
M2p = [A0 , A20 , A10 , A5 , A15 , A25 , A3 , A13 , A23 , A8 , A18 , A28 , A1 , A11 , A21 , A6 , A16 ,
A26 , A4 , A14 , A24 , A19 , A9 , A29 , A12 , A2 , A7 , A22 , A27 , A17 ],
where A0,1,2,...,29 are the columns of matrix M2 from left to right.
The output bits from the second interleaving step are then read out column by
column from the matrix M2 p.
26(38)
2013-06-08
9 Implementation
This section covers the implementation, the design of the software and implementation
specific issues.
Figure 19: A scheme of the signal processing blocks of the receiver chain.
9.1 Concept
The implemented software consists of two signal processing blocks. The blocks are
combined with other signal processing blocks in a flow chart that makes up the receiver.
Figure 19 displays a scheme of the receiver chain. The implemented slot Sync block and
the Resampler blocks are described further within this section. The other blocks in the
figure are standard GNU radio blocks.
2013-06-08
number of samples in order to make sure that the radio has become stable. When
done, it changes state into FIND SLOT SYNC.
FIND SLOT SYNC, at this state the signal processing block searches for the slot
boundaries by correlating the PSC against the received signal in order to detect slot
boundaries (Section 5.1). To improve the slot boundary detection, the correlation
is performed for the duration of 3 frames and the result is accumulated in order to
improve the correlation peaks.
This is performed by, for each new sample that is arriving to the signal processing
block, calculating the sum of the chip wise multiplication of the PSC and the latest
received samples. The result is accumulated in a buffer, BsbAcc , with length equal
to the number of samples per slot l, in this case 5120. The result is stored at
position isample , where i is the current sample number. After 3 15 l number of
samples (three frames) the index isBound of the highest accumulated value in the
buffer BsbAcc is calculated. The slot boundaries can now be considered to start
on each sample where the following condition is met, ((s + 511) mod l) = isBound
where s is the sample number. The addition of 511 comes from fact that the index
isB ound is placed at the end of the PSC correlation, and each new slot starts at the
beginning of the PSC.
FIND FRAME SYNC, at this state the signal processing block tries to detect the frame
boundaries and tries to identify the scrambling code group (Section 5.2). On success it switches state into IN SYNC and in case of failure to detect frame boundaries
or scrambling code group it goes back to state WAIT ON RADIO, to try the same procedure again.
At the start of each slot 512 samples are stored away in a buffer Bssch , capturing
the S-SCH. The sixteen SSCs are then correlated against the buffer Bssch at offset
zero in order to decide which SSC with the best match in each slot. The result
is accumulated over seven frames before deciding which SSC sequence the cell is
using. The SSC sequence is then checked against a table containing the valid SSC
sequences for each scrambling code group.
IN SYNC, when in this state the slot- and frame- boundaries and the scrambling
code group have been successfully detected. In this state the signal processing
block starts to identify the primary scrambling code for the cell, as described in
Section 5.3. Once detected it starts receiving the PCCPCH bits (see Section 7).
Meanwhile in this state, since the samples delivered to the block may drift in time
with respect to how they are transmitted from the RBS, some simple mechanism is
needed in order to keep slot and frame synchronisation. This is done by correlating
the PSC around the detected slot boundaries in order to detect if the chips are
drifting in time. If this occurs it is corrected by inserting or removing extra chips.
Received PCCPCH frames are stored away in an array for offline processing, since
the decoding of the BCH is too time consuming to be performed in real time by
software running on a standard computer at the time of the implementation.
28(38)
2013-06-08
29(38)
2013-06-08
10 Results
10.1 Receiver performance
The RSSI scan performance were measured in a lab environmet, scanning through the
frequency range from 2.126 GHz to 2.158 GHz on a 200 kHz raster with one cell located
at 2.14 GHz. With a cell power of 90 dBm / 3.84 MHz the frequency containing the
cell is placed around the first quartile in the frequency ranking list from the RSSI scan.
Raising the cell power to 75 dBm / 3.84 MHz places the cell frequency near the top of
the ranking list.
The WCDMA receiver is capable of decoding BCH data from live cells. In a simulated lab environment the WCDMA receiver has been used to decoding BCH data on
power levels around -115 dBm / 3.84 MHz although on power levels below -110 dBm /
3.84 MHz decoding problems starts to arrive quite frequently Figure 24 shows the measurement tests on the different power levels. On live networks no detailed performance
measurements has taken place, although the receiver has been able to decode the BCH
data from the live cells that have been tested. It should also be noticed that the receiver
only works under static conditions. This is because of no functionality for continuously
monitoring and tracking peaks (by continuously correlating the scrambling code against
the received signal). That functionality would probably be too computationally expensive to perform in software. Figure 20 contains charts of PSC correlations performed
against a live cell and against the lab equipment and Figure 21 displays plots of the
received CPICH symbols in live and lab environment. Figure 22 displays the rotated
CPICH symbols.
Figure 20: Plot of the magnitude of the correlation (|R[m]|) of the PSC against the
received signal during slot synchronisation.
30(38)
31(38)
2013-06-08
2013-06-08
During the development of the receiver, the Raised Root Cosine (RRC) filter unintentionally was left unconfigured, resulting in the filter having none or minimum impact.
Configuring the RRC filter resulted in a great performance boost. From having trouble
with reading the BCH and synchronising against cells with power levels below -80 dBm
/ 3.84 MHz to having no problem at power levels below -100 dBm / 3.84 MHz. Figure 23
and 24 shows performance graphs of the receiver, before and after the RRC filter setup.
The performance data were collected by examining the results from six consecutive test
runs of the receiver software on each power level.
Figure 23: Performance graph of the receiver for different power levels, before RRC filter
setup.
Figure 24: Performance graph of the receiver for different power levels, after the RRC
filter setup.
32(38)
2013-06-08
Cost
4 Mul + 4 Add
1 cMul
2 mul
10 floating point operations (flop)
2560 10 = 25600 flop
25600 15 = 384000 flop
384000 100 = 38.4 Mflop/s
The goal of this thesis project, to implement a software WCDMA receiver with
capability of receiving broadcast messages from a WCDMA cell, is much likely how far
it is possible to take this in pure software today, with signal processing being performed
on a standard CPU. Although worth mentioning is that the USRP radio used in this
project contains an on-board FPGA, so it would probably be possible to implement high
computationally costly parts in hardware.
The solution presented in this thesis only performs parts of the tasks in almost real
time, the caption of the PCCPCH bits. The rest of the decoding is performed offline.
The term almost real time is used since the implementation, running on the hardware
used during development, is not processing samples in the same phase that they arrive.
The samples are actually arriving faster then what the implementation can process.
The implementation works since large sampling buffers are used and the caption of the
PCCPCH bits is finished before the buffers are overrun.
One of the first ideas of the implementation was to write modular signal processing
blocks for GNU Radio for the different tasks eg. correlation, de-scrambling, de-spreading
and so on and combine these into a receiver that performs synchronisation against a
WCDMA cell. This early showed to be a bad decision since a lot of CPU cycles are
wasted only for pushing the samples around the flowchart.
Throughout the WCDMA receiver, different constant values are used for filter settings, number of accumulations etc. Nearly no effort has been made to tune these
constants, in order to improve performance. Most of the constants were simply hand
33(38)
2013-06-08
picked during the implementation phase, so there is probably some optimisations that
can be done by simply tweaking the different constants.
2013-06-08
35(38)
11 Abbreviations
2G
3G
3GPP
AS
BCCH
BCH
CDMA
CN
CPICH
DL
EDGE
FDD
FDMA
GNU
GSM
MAC
NAS
OVSF
P-SCH
PCCPCH
PSC
RAT
RBS
RLC
RNC
RRC
RSSI
S-SCH
SDR
SFN
SSC
TDD
TDMA
UE
UL
UMTS
USRP
UTRAN
WCDMA
Second generation
Third generation
3rd Generation Partnership Project
Access stratum
Broadcast control channel
Broadcast channel
Code division multiple access
Core network
Common pilot channel
Downlink
Enhanced data rates for GSM evolution
Frequency division duplex
Frequency division multiple access
GNUs Not Unix
Global system for mobile communications
Medium access control
Non access stratum
Orthogonal variable spreading factor
Primary synchronisation channel
Primary common control physical channel
Primary synchronisation code
Radio Access Technology
Radio base station
Radio link control
Radio network controller
Radio resource control
Received signal strength indicator
Secondary synchronisation channel
Software defined radio
System frame number
Secondary synchronisation code
Time division duplex
Time division multiple access
User equipment
Uplink
Universal mobile communications system
Universal software radio peripheral
UMTS terrestrial radio access network
Wideband code division multiple access
36(38)
2013-06-08
2013-06-08
References
[1] Walter Tuttlebee, Eduardo Ballesteros, Paul Bender, Wayne Bonser, Rainer Bott,
Didier Bourse, Pubudu Chandrasiri, Kate Cook, Markus Dillinger, Gavin Ferris, Mike Grable, Shinichiro Haruyama, David Hislop, Ryuji Kohno, Ruediger
Leschhorn, Allan Margulies, Carlos Martnez, Joseph Mitola III, Stephen OFee,
John D. Ralston, Software Defined Radio - Origins, Drivers and International Perspectives, John Wiley & Sons, 2002, ISBN 0470 84464 7.
[2] Bannister Mather Coope, Convergence Technologies for 3G Networks IP, UMTS,
EGPRS and ATM. WILEY, 2005.
[3] Richardson, WCDMA Design Handbook. University Press, Cambridge, 2006.
[4] 3rd Generation Partnership Project, Technical Specification 25.201 - Physical layer
- general description, 3GPP TS 25.201 V7.3.0 (2007-05).
[5] 3rd Generation Partnership Project, Technical Specification 25.211 - Physical channels and mapping of transport channels onto physical channels (FDD), 3GPP TS
25.211 V9.2.0 (2010-09).
[6] 3rd Generation Partnership Project, Technical Specification 25.212 - Multiplexing
and channel coding (FDD), 3GPP TS 25.212 V7.7.0 (2007-11).
[7] 3rd Generation Partnership Project, Technical Specification 25.213 - Spreading and
modulation (FDD), 3GPP TS 25.213 V9.2.0 (2010-09).
[8] 3rd Generation Partnership Project, Technical Specification 25.214 - Physical layer
procedures (FDD), 3GPP TS 25.214 V7.12.0 (2009-05).
[9] 3rd Generation Partnership Project, Technical Specification 25.215 - Measurements
(FDD), 3GPP TS 25.215 V9.2.0 (2010-03).
[10] GNU Radio website, http://www.gnuradio.org
[11] Ettus Research website, http://www.ettus.com
[12] Walter Tuttlebee, Marc Beach, Stephen Blust, Brad Brannon, Darren K. Brock,
Paul Bucknell, John Chapin, Chris Cloninger, Mark Cummings, Dimitrios Efstathiou, Gerhard Fettweis, Paul Hendriks, Tim Hentschel, Bahram Honary,
Friedrich Jondral, David Lund, Paul Master, John MacLeod, Joseph Mitola III,
Klaus Moessner, Steve Pitchers, Bob Plunkett, Paul Warr, Ed Willink, Zoran
Zvonar, Software Defined Radio - Enabling Technologies, John Wiley & Sons, 2002,
ISBN 0-470-84600-3.
[13] The Wireless Innovation Forum website, http://www.wirelessinnovation.org
[14] SDRF Cognitive Radio Definitions, SDRF-06-R-0011-V1.0.0,
URL(2013-06-08): http://groups.winnforum.org/d/do/1585
37(38)
8 Nov 2007,
2013-06-08
[15] National Instruments Measurement Fundamentals series, What is I/Q Data?. National Instruments webpage (2011-05-20),
http://zone.ni.com/devzone/cda/tut/p/id/4805
[16] 3GPP website, http://www.3gpp.org
[17] Steven W. Smith, The Scientist and Engineers Guide to Digital Signal Processing,
1997-1998, For more information visit the books website at: www.DSPguide.com
[18] 3rd Generation Partnership Project, Technical Specification 25.302. 3GPP TS
25.302 V3.6.0 (2000-09)
[19] Viterbi, A.J., Error Bounds for Convolutional Codes and an Asymptotically Optimum Decoding Algorithm, IEEE Transactions on Information Theory, April 1967;
IT - 13 (2) : pp. 260 - 269.
[20] M. S. Ryan, G. R. Nudd, The Viterbi Algorithm Department of Computer Science,
University of Warwick, Coventry, 1993
[21] Andrea Goldsmith, Wireless Communications, Chapter 8.8.2 Convolutional Coding
with Interleaving, Cambridge University Press, 2005
[22] J.Kim, S.Hyeon, S. Choi, SDR system using graphics processing unit, IEEE Communications Magazine, pp. 156-168, March 2010.
[23] OpenBTS, http://gnuradio.org/redmine/projects/gnuradio/wiki/OpenBTS (2012)
38(38)