0% found this document useful (0 votes)
13 views

Design and Implementation in USRP of A Preamble-Based Synchronizer For OFDM Systems

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Design and Implementation in USRP of A Preamble-Based Synchronizer For OFDM Systems

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Design and implementation in USRP of a

preamble-based synchronizer for OFDM systems


José Herrera-Bustamante, Vanessa Rodríguez-Ludeña, A.G. Correa-Mena and Diego Barragán-Guerrero
Departamento de Ciencias de la Computación y Electrónica (DCCE), Universidad Técnica Particular de Loja-Ecuador
Email: [email protected], [email protected], [email protected], [email protected]

Abstract—The Orthogonal Frequency Division Multiplexing the received signal through a correlation-based scheme, where
(OFDM) is one of the most widely adopted schemes in wireless that phase is used to correct the Carrier Frequency Offset
technologies such as Wi-Fi and LTE due to its high transmission
arXiv:2008.12404v1 [eess.SP] 27 Aug 2020

(CFO) introduced by the wireless channel [3].


rates, and the robustness against Intersymbol Interference (ISI).
However, OFDM is highly sensitive to synchronism errors, which In that regard, we implemented an effective synchronism so-
affects the orthogonality of the carriers. We analyzed several syn- lution for multi-carrier communication systems in a Software
chronization algorithms based on the correlation of the preamble Defined Radio (SDR) platform, i.e., the Universal Software
symbols through the implementation in Software-Defined Radio Radio Peripheral (USRP) [4]. In particular, we investigated the
(SDR) using the Universal Software Radio Peripheral (USRP).
Such an implementation was performed in three stages: frame performance of the preamble-aided synchronization algorithms
detection, comparing the autocorrelation output and the average in an SDR environment, using GNU Radio. Together with
power of the received signal; time synchronism, where the cross- the Ettus USRP N210 equipment capabilities, GNU Radio
correlation based on the short and long preamble symbols was becomes a robust platform to simulate, test, and improve
implemented; and the frequency synchronism, where the Carrier communication systems’ critical stages.
Frequency Offset (CFO) added by the channel was detected and
corrected. The synchronizer performance was verified through This paper is organized as follows. In Section II are
the USRP implementation. The results serve as a practical summarized the main characteristics of the OFDM technique,
guide to selecting the optimal synchronism scheme and show as well as, the particularities of the IEEE 802.11a preamble
the versatility of the USRP to implement digital communication and the channel model. In sections III, IV, and V the three
systems efficiently.
Keywords—OFDM, synchronization, USRP, SDR, IEEE
stages to perform the preamble-based synchronizer design are
802.11. described: frame detection, time synchronism, and frequency
synchronism, respectively. In Section VI, the results and dis-
I. I NTRODUCTION cussion of the performance of the synchronization algorithms,
in terms of the variance, are shown. Finally, in Section VII
The Orthogonal Frequency Division Multiplexing (OFDM) the conclusions are presented.
technique is one of the most common modulation schemes
characterized by dividing the available wireless channel band-
width into several orthogonal subcarriers [1]. OFDM also II. S ETTING THE ENVIRONMENT
provides low Intersymbol Interference (ISI) [2], efficient use
of the spectrum, and a simpler equalization. Thus, OFDM A. Preamble-aided synchronization: the IEEE 802.11 stan-
guarantees robustness communication in both Additive White dard
Gaussian Noise (AWGN) channels and multi-path Rayleigh
channels. Due to these characteristics, OFDM has been In a multi-carrier communication system, the synchroniza-
adopted in the physical layer of the IEEE 802.11 standard tion stage is usually carried out through the correlation of the
and its amendments. However, a precise synchronism must be preamble symbols. Such a scheme is known as preamble-aided
achieved to maintain the mentioned characteristics. synchronization. Some IEEE 802.11 standards have adopted
Synchronism is a crucial step to receive transmitted in- a deterministic preamble to facilitate packet synchronization.
formation correctly. In an OFDM system, it is divided into Throughout this paper, we use the well-known IEEE 802.11a
three stages: frame detection, time synchronism, and frequency preamble sequence to simulate and implement the algorithms
synchronization. The frame detection is carried out by com- in the USRP.
paring the autocorrelation of the received signal against its The IEEE 802.11a standard and its amends are used in
average power; the time synchronism determines the beginning Wireless Local Areas Networks (WLANs), which support
of the information in the frame through cross-correlation of the speeds up to 54 Mbps, and employ OFDM as the modulation
received signal with a training sequence (i.e., short and long technique due to its optimum performance in highly dispersive
preamble symbols); and, finally, the frequency synchronism channels. Moreover, it uses 52 subcarriers out of 64 available
is used to align the frequency between the carriers of the to deal with the adjacent channel interference (ACI), 48 of
receiver (RX) and the transmitter (TX), reducing the Inter- them convey user data, 4 are pilot tones for phase tracking,
Carrier Interference (ICI). The last stage detects the phase of and the remaining 12 are null tones [5].

978-1-7281-9365-6/20/$31.00 c 2020 IEEE


B. Preamble and channel model
Index of subcarriers Index of subcarriers
As shown in Fig. 1, the OFDM preamble sequence is
composed of two sets of short and long symbols. The ten
STS LTS
short symbols, consisting of 16 complex samples, are known
as the Short Training Sequence (STS). The two long symbols,
composed of 64 complex samples, represent the Long Training IFFT
* IFFT
Sequence (LTS) [6]. Usually, the STS is used in frame
detection and the LTS in time and frequency synchronism. IDFTLTS → symbol
1 long
Between the STS and LTS are added 32 Cyclic Prefix (CP)
4 short
samples, reaching 320 samples in the full-frame. The OFDM IDFTSTS → symbols IDFTLTS(33:64) → CP
scheme, aided with this preamble, reduces the ISI effect and
makes the system robust against the multipath fading.
In Fig. 2 the procedure to generate the IEEE 802.11a pream-
ble is shown. The preamble construction method detailed in IDFTSTS IDFTSTS IDFTSTS(1:32) CP IDFTLTS IDFTLTS
[5] is used to generate a sequence in Python.
The channel model scheme is shown in Fig. 3, where s(t)
represents the transmitted signal, and r(t) is the received
signal affected by the channel noise and the frequency offset
∆f . The so-called tapped-delay channel has been selected as
the channel model for this work, in particular, the A and STS CP LTS
C versions of the European Telecommunications Standards
Institute (ETSI) channel models [7]. These models include the
Fig. 2. IEEE 802.11a preamble generation scheme.
multipath fading behavior, frequency deviation, and AWGN
channel. For simulation purposes, we added the frequency
offset by multiplying the transmitted signal by a complex
exponential, where the value of each offset represents the
s(t) x + r(t)
optimal (∆f = 0 kHz), moderate (∆f = 100 kHz) and severe
(∆f = 200 kHz) conditions.
f
0 kHz
j 2 f t
100 kHz
e AWGN
200 kHz
C. GNU Radio blocks and system setup
Fig. 3. AWGN channel model including CFO.
All synchronism stages were designed using Python and
embedded into a custom block denominated Out-Of-Tree
(OOT) module inside the GNU Radio Companion (GRC) moving average filter. In this paper, the implemented algo-
interface. Each OOT block, created through the gr_modtool rithms are based on the correlation of the preamble symbols.
performs dedicated processing on the received preamble. The For test purposes, only LTS and STS were sent between TX
Vector Source provides the values obtained in the preamble and RX; thus, the preamble is transmitted repeatedly from one
generation to be transmitted and the WX GUI Scope Sink USRP to another, running the implemented algorithms in each
graphically shows the response over time of each detector. transmission.
Frame Detector detects the presence of the package. Its All synchronization algorithms were implemented in a
implementation is based on Fig. 4. Time synchronism based on transceiver system mounted on two PCs with Ubuntu 14.04 op-
STS and LTS symbols is implemented according to schemes erating system, and its Gigabit Ethernet ports were connected
shown in Fig. 5a and Fig. 5b, respectively. CFO Detector to USRP N210 modules. WSS016 omnidirectional antennas
estimates and compensates the magnitude of CFO introduced were used for the radio interface. A 900 MHz frequency carrier
by the channel. Such detection is based on Fig. 6. In all the was set up, a transmitter gain of 30 dB, a sampling frequency
schemes, the Cascaded Integrator–Comb (CIC) works as a of 20 MHz, and BPSK signaling as the digital modulation
scheme.

Autocorrelation CIC
R[n] Filter
|·|² Detection
r[n]
Power CIC
˃ Accumulator
CIC Filter
P[n] (·)² x
Filter
0.5

Fig. 1. OFDM preamble sequence compose of STS and LTS symbols, used
before data frame. Fig. 4. Frame Detection algorithm scheme.
Cross Correlation Window STS Position where R {·} and I {·} denote the real and imaginary part of
r[n]
Ʌ[n] (152:168) nxc-max a complex number, respectively. In [9][10], it has shown that
an optimal threshold for frame detection is equal to the power
of the received signal divided by two. Rewriting equation (3),
Zeros: 304 IDFTSTS (1:16) we have:

2
(a) |R[n]| > 0.5P [n]2 . (5)

Cross Correlation Window LTS Position Such a simplification has an additional advantage because
r[n]
Ʌ[n] (288:352) nxc-max a division by two is straightforwardly implemented as a
shift register, optimizing the hardware resources and reducing
processing latency.
Zeros: 256 IDFTLTS
The frame detection scheme, based on (5), is shown in
Fig. 4. The preamble length is 320 complex values, which
(b) is equivalent to a signal period of 16 µs. As shown in Fig.
Fig. 5. Time Synchronization algorithm schemes for: (a) STS and (b) LTS.
7a, the ratio between the absolute value of the correlation and
the received power, indicates the presence of the frame at the
receiver. Fig. 7b shows the output of (5). Given that we sent
r[n]
Autocorrelation CIC Synchronized Preamble
several times the preamble through the channel, it is obtained
r[n] x
R[n] Filter s [n] a pulse train (see Fig. 8), which indicates the frames detected

and the effectiveness of the implemented algorithm.
  f=
2 nTs e− j2 f t
arg(R[n])
IV. T IME SYNCHRONISM
Fig. 6. CFO Detection algorithm scheme with preamble synchronization. Time synchronism is defined as the detection of the sample
position where the frame or user information begins [11]. Like
frame detection, this synchronism can be carried out by taking
III. F RAME DETECTION advantage of the preamble structure.
Frame detection informs the presence or absence of a frame The implemented algorithm is based on the cross-
(user information) at the receiver. The frame detection method correlation, and it is mathematically expressed as:
implemented in this work is based on the Schmidl and Cox L−1
algorithm [8], where the received signal rn is correlated with
X
Λ[n] = (c∗m rn+m ), (6)
its delayed conjugate version rn∗ . The delay length (in samples) m=0
is equal to a short symbol duration. Thus, the correlation is
denoted by: where c∗m is the complex conjugate of the preamble samples
and the cross-correlator inputs are the samples of the received
L−1
X signal rn . Such a cross-correlator needs L complex multi-


R[n] = rn+m rn+m+L , (1) plications to compute each output value, representing a high
m=0 computational cost. However, this cost is compensated due to
where L represents the delay (16 samples, corresponding to a
short symbol length). 0.05
|R[n]|2 Autocorrelation_
A frame is detected if the ratio M [n] between the square of 0.04
(P[n])2
Amplitude

Power + Threshold
the absolute value of R[n] and the signal power P [n] reaches 0.03

0.02
a threshold. These parameters are defined as follows: 0.01

0.00
L−1 0 50 100 150 200 250 300
X Sample
2
P [n] = |rn+m+L | , (2) (a)
m=0
0.10
Detection
2
|R[n]| 0.08 Detection + 16 samples accumulator
Amplitude

M [n] = 2 > threshold. (3) 0.06


P [n] 0.04

0.02
According to (1), the correlation output R[n] is a complex 0.00
0 50 100 150 200 250 300
parameter. To compute its modulus we have applied an ap- Sample
2
proximation where |R [n]| is calculated by: (b)

Fig. 7. (a) Autocorrelation waveform |R [n]|2 and signal power P [n]2 (b)
2 Frame detected M [n]> threshold.
|R[n]| ≈ |R {R[n]}| + |I {R[n]}| , (4)
Scope Plot Scope Plot
1.0
0.04
0.8
0.03
Counts

0.6
0.02

Counts
0.4
0.01
0.2
0
0.0
-0.01
0 5 10 15 20 25 30 35 40
Time (µs) -0.02
-0.03
400 450 500 550 600 650 700 750
Fig. 8. Frame detection output pulse on each signal received. Time (µs)
(a)
the results show that this detection is more precise than the
autocorrelation algorithms. Scope Plot
The position nxc max of the maximum value of |Λ[n]|, 5
which provides the beginning of the user information, is 4

defined as [12]: 3

Counts
2
nxc max = arg max (|Λ[n]|) . (7) 1
0
The time synchronism schemes that process the STS and -1

LTS samples were implemented according to Fig. 5a and Fig. -2


60 65 70 75 80 85 90 95
5b, respectively. In severe channel conditions, synchronization Time (µs)

based on LTS is preferred because its output has a greater (b)


magnitude. Also, with STS, ten peaks have to be detected. Fig. 9. Time synchronization scheme output with (a) STS and (b) LTS.
Instead, with the LTS, only two peaks need to be identified,
which implies a reduction in the algorithm’s computational
load. When passing through the channel, the signal is affected by
The IEEE802.11a standard specifies that the autocorrelation the ∆f frequency offset. Therefore, the information reaches
peaks must be located at the sample number 160 for the STS the receiver with a different carrier frequency (i.e., ∆f = ftx −
and 320 for LTS. However, due to the channel noise and frx ). The diagram used in this stage is shown in Fig. 6. For
the propagation delay, a random displacement of the position simplicity, the effect of additive white Gaussian noise was not
of the symbol is expected. For this reason, equation (7) is taken into account.
performed within a window that is equal in size to the number To implement the CFO detector, the received signal rn from
of symbol samples. (1) is replaced by the product between the discrete training
The results obtained after the implementation of the STS sequence and a complex exponential with phase equal to ∆f .
and LTS detectors are shown in Fig. 9. To obtain a correct Hence, we obtain a simplified autocorrelation R[n] defined as:
correlation, zero inputs values at the beginning of each symbol
L−1
(to complete the 320 signal samples) were added. Ten peaks X
corresponding to the STS symbols are shown in Fig. 9a; while R[n] = exp(−j2π∆f LTs ) (sn+m s∗n+m+L ), (9)
m=0
in 9b appears two peaks of the LTS symbols and the third one
of smaller magnitude. The last peak is located at the ending where sn is a short symbol and the complex conjugate. s∗n is
position of the CP, and it is formed with the first 32 LTS The phase of the autocorrelation R[n] is proportional to the
samples. phase offset φ introduced by the channel, i.e. φ ≈ arg(R[n]).
It allows finding the value of the CFO ∆f through:
V. CFO DETECTOR AND F REQUENCY SYNCHRONISM
arg(R[n])
The main objectives of the frequency synchronism are to , ∆f = (10)
2πLTs
detect and compensate for the CFO ∆f and the carrier phase
error φ. The ICI causes both impairments as a consequence where L = 16. Once the value of ∆f is known, to compensate
of the Doppler effect, whose impact results in loss of orthog- the frequency offset, the received signal is multiplied by a
onality between subcarriers [13]. complex exponential with phase equal to −∆f as
The Doppler effect, caused by the relative movement be-
tween transmitter and receiver, provokes a signal variation in sn = rn exp(−j2π∆f nTs ). (11)
time and frequency domains [14]. Thus, the frequency shift If ∆f is similar to the frequency offset, the phase difference
between the transmitted and received signal is computed by: is compensated and the frame can be considered synchronized.
Fig. 10 shows the autocorrelation output used for the
φ
∆f = , (8) CFO detection. These waveforms change depending on the
2πnTs separation between the TX and the RX. Thus, in Fig. 10a and
where Ts is the sample time and φ = 2πn∆f . Fig. 10b the distance was 0.3 m and 6 m, respectively.
Scope Plot
0.025
0.020 250
200
0.015
200

Number of samples
0.010

Number of samples
Counts

150
0.005
150
0
100
-0.005 100
-0.010
50
-0.015 50
5 10 15 20 25 30 35 40 45
Time (µs)
0 0
154 156 158 160 162 164 166 290 300 310 320 330 340 350
(a) Sample Sample

(a) (b)
Scope Plot
0.010
Fig. 11. Histogram of the synchronizer output using (a) STS symbols and
0.008
(b) LTS symbols.
0.006
0.004
Counts

0.002 TABLE I
0 VARIANCE OF TIME SYNCHRONIZATION ALGORITHMS
-0.002
-0.004 Algorithms Trials (N) σ2
-0.006
5 10 15 20 25 30 35 40 45 Cross-correlation STS 300 6.589
Time (µs)
(b) Cross-correlation LTS 300 45.040

Fig. 10. Autocorrelation output used for the CFO detection at: (a) 0.3 m and
(b) 6 m of distance between the USRPs. We performed two tests to evaluate the performance of
the implemented CFO detector. In the first test, the USRPs
VI. R ESULTS AND DISCUSSION were 0.30 m apart while in the second test, the USRPs were
separated 6 m. In Fig. 12 the histograms of the CFO values
Considering the frame detection scheme of Fig. 4, the trans-
detected with these two distances between the transmitter and
mitted continuous signal containing the preamble sequence
the receiver are shown. We computed the variance of the
was successfully detected in each transmission. The resulting
detected frequency offset resulting in the numerical outcomes
waveform is an active signal (plateau-shaped) when at least
shown in Table II. As expected, the implemented algorithm
two successive short symbols are correlated (32 first samples).
detects a higher CFO at a distance of 6 m, with a prominent
Each OFDM preamble was transmitted under slightly differ-
value of 30 kHz, which is then compensated using the scheme
ent channel conditions. Thus, it will result in different detected
shown in Fig. 6.
values for the time and frequency offset. The variance σ 2 of the
detected values xi is the metric used to assess the performance VII. C ONCLUSIONS
of the time and frequency synchronization algorithms. An
algorithm whose variance is the smallest is more efficient. This In this paper, a preamble-based synchronizer implemented
variance is computed by: in USRP for OFDM is reported. The OFDM synchronism is
N
divided into three stages: the packet or frame detection, time
P 2 synchronism, and frequency offset detection and correction. In
(xi − x̄)
σ2 = i=1
, (12) frame detection, the autocorrelation amplitude’s modulus was
N compared against the average power of the signal multiplied
where x̄ is the sample mean and N is the number of trials.
The obtained histograms for the STS and LTS synchronizers
are shown in Fig. 11a and Fig. 11b, respectively, which
indicates an optimal performance of the implemented schemes, 250 25

since they have a prominent value close to sample numbers 200


Number of samples

20
Number of samples

160 (STS) and 320 (LTS), as it is expected. The variance of


the detected positions in this algorithm was computed and its 150 15

result is shown in Table I. 100 10


According to Table I, the cross-correlation scheme using
STS obtains a lower variance, making this scheme the most 50 5

accurate algorithm. However, it is worth noting that in Fig. 9b, 0 0


0 2 4 6 8 10 12 14 28 30 32 34 36 38 40
the peak amplitude generated with the LTS cross-correlation is Δf [kHz] Δf [kHz]

greater than the magnitude of the peaks with STS. In this way, (a) (b)
the LTS cross-correlation output would be useful in severe Fig. 12. Histogram of the CFO values detected at: (a) 0.3 m and (b) 6 m of
channel conditions. distance between the USRPs.
TABLE II OFDM communication based on IEEE802.11a,” in 2009
VARIANCE OF THE FREQUENCY SYNCHRONIZATION Int. Forum on Inf. Technol. and App., vol. 1, 2009, pp.
ALGORITHM
190–193.
Algorithm Distance TX-RX (m) Trials (N) σ2 [4] A. L. G. Reis, A. F. B. Selva, K. G. Lenzi, S. E. Barbin,
and L. G. P. Meloni, “Software defined radio on digital
CFO detector 0.3 300 2.200
communications: A new teaching tool,” in IEEE Wireless
CFO detector 6 300 9.161 Microwave Technology Conf., Apr. 2012, pp. 1–8.
[5] LAN/MAN Standards Committee, IEEE-SA Standards
Board, Institute of Electrical and Electronics Engineers,
by a threshold. When the autocorrelated signal’s modulus was and IEEE-SA Standards Board, Supplement to IEEE
higher than half of the average power in at least 32 samples Standard for Information Technology – High-Speed Phys-
(equivalent to two STS symbols), the result was a step- ical Layer in the 5 GHz Band. IEEE, 1999.
type (plateau-shaped) active signal indicating the successful [6] L. Zhou and M. Saito, “A new symbol timing synchro-
detection in the receiver of a transmitted frame. nization for OFDM based WLANs,” in IEEE 15th Int.
In time synchronism, the wireless channel noise caused Symp. on Personal, Indoor and Mobile Radio Comm.,
a variation in the positions of the peaks of STS and LTS vol. 2, 2004, pp. 1210–1214 Vol.2.
correlation, as expected. Based on the results, cross-correlation [7] J. Medbo and P. Schramm, “Channel Models for HIPER-
with STS yields a more accurate synchronism. Besides, it is LAN/2 in Different Indoor Scenarios,” in The 13th IEEE
recommended to use in severe channel environments the cross- Int. Symp. on Personal, Indoor and Mobile Radio Com-
correlation scheme with the LTS. munications, 2002., vol. 1. IEEE, Mar. 1998, pp. 125–
According to the practical experiments, the CFO detected 129.
with the implemented scheme is proportional to the separa- [8] T. M. Schmidl and D. C. Cox, “Robust frequency and
tion between the transmitter and receiver. At 0.3 m distance timing synchronization for OFDM,” IEEE Trans. on
between the USRPs, the frequency offset was close to 0 kHz. Comm., vol. 45, no. 12, pp. 1613–1621, Dec. 1997.
As the distance between the USRPs raised, the CFO values [9] M. J. Canet, F. Vicedo, V. Almenar, J. Valls, and E. R. D.
were increased with each performed test. With a separation Lima, “A common FPGA based synchronizer architec-
of 6 m in an indoor environment, an average of 32 kHz of ture for Hiperlan/2 and IEEE 802.11a WLAN systems,”
frequency offset was detected. in IEEE 15th Int. Symp. on Personal, Indoor and Mobile
The implemented synchronization algorithms offer promis- Radio Comm., vol. 1, Sep. 2004, pp. 531–535 Vol.1.
ing results over the AWGN channel for an OFDM system, [10] K. Yip, T. Ng, and Y. Wu, “Impacts of multipath fading
where it was shown to be suitable for preamble-based detec- on the timing synchronization of IEEE 802.11a wireless
tors. Finally, extending the proposed implementation to other LANs,” in IEEE Int. Conf. on Commun. (ICC), vol. 1,
802.11 amends would be of interest for future research. 2002, pp. 517–521 vol.1.
[11] D. Barragán and L. Meloni, “Implementação em FPGA
R EFERENCES de algoritmos de sincronismo temporal para OFDM,” in
[1] M. M. Boter, “Design and Implementation of an OFDM- XXXI Simposio Brasileiro de Telecomunicações, 2013.
based Communication System for the GNURadio Plat- [12] J. Xie, Y. Ding, S. Yang, and L. Qi, “FPGA implemen-
form,” Master’s Thesis, Institut für Kommunikation- tation of frame synchronization and symbol timing syn-
snetze und Rechnersysteme, Universität Stuttgart, Dec. chronization based on OFDM system for IEEE 802.11a,”
2009. in Int. Symp. on Intelligent Signal Processing and Comm.
[2] C. El Hajjar, “Synchronization Algorithms for OFDM Systems, Dec. 2010, pp. 1–4.
Systems (IEEE802.11a, DVB-T): Analysis, Simula- [13] T.-D. Chiueh and P.-Y. Tsai, OFDM Baseband Receiver
tion, Optimization and Implementation Aspects.” Ph.D. Design for Wireless Communications. Wiley Publishing,
dissertation, Friedrich-Alexander-Universitat Erlangen- 2007.
Nurnberg, 2007. [14] Y. S. Cho, J. Kim, W. Y. Yang, and C. G. Kang, MIMO-
[3] S. Wensheng and Z. Yuanyuan, “A frame synchronization OFDM Wireless Communications with MATLAB. Wiley
and symbol timing synchronization algorithm in burst Publishing, 2010.

You might also like