Design and Implementation in USRP of A Preamble-Based Synchronizer For OFDM Systems
Design and Implementation in USRP of A Preamble-Based Synchronizer For OFDM Systems
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
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
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
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
20
Number of samples
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.