I. I NTRODUCTION
The communication signal processing laboratory project 2016 will be carried out in groups of 1-2
students. The laboratory project will get you familiar with the OFDM transceiver baseband chain, including
synchronization and channel estimation. The laboratory assignment is carried out with six tasks including
simulations and MATLAB and C coding of algorithms. The work is done using MATLAB based downlink
computer simulator. If you encounter problems which you cannot solve with these instructions, please do
not hesitate contact the laboratory project supervisor. If you did not attend the introductory lecture on the
course work (01st of September, 2016) or if you have set your group later, email the supervisor to get
your group specific parameters.
A. Reporting
You are expected to write a brief technical report of you results in each task. Include the codes in the
reports. Please, upload each task report to Optima under Laboratory work 2016 in the corresponding task
folder. Include the student numbers of the people in your group in the report. The final report should
include an overview of the relevant theory associated with each task. You can find the background from the
references of this document (also in Optima Laboratory work 2016 folder) and from the course material
and book. The structure of the final report can be according to the departments thesis instructions which
can be found for example in: http://www.oulu.fi/eeng/node/6987
Each report should have the following structure and include at least
1) Introduction
2) From the first 4 tasks:
a) Theory
b) Simulation model
c) Codes (appendix)
d) Simulation results
e) Discussion
3) From the last 2 tasks:
a) Theories related to fixed point simulation
b) Word lengths and simulation results
c) Discussion
4) Summary
II. D OWNLINK S IMULATOR
A MATLAB simulator is provided for the laboratory work. The goal is to run simulations, analyze and
report the results. The simulator works in the Unix or Windows environment.
2
Transmitter
Initialization of
parameters
START
Initialize channel
Training
initialization
Update HARQ
parameters
Data_transmit1
Reference/
synchronization
signal insertion
Channel
generation
Turbo coding
Data_transmit3
IFFT+CP
(received_signal_TD)
Precoding
tx_sym_cp
Bit interleaving
Data_coded_intrl_bits
Data_transmit
Space-timefrequency mapping
Channel + noise +
impairments
(received_signal_TD)
Symbol
interleaving
Modulation
Data_coded_mod
received_signal_td
Receiver
Synchronization,
time domain
FFT+CP rem.
(TD_to_FD)
Synchronization,
freq. domain
Channel
estimation
R_tot
Linear detection
e.g. LMMSE
H_tot
Symbol
deinterleaving
Demodulation
LL_tmp1
END
Error counting
Turbo decoding
Bit deinterleaving
Chase combining
LL
Figure 1.
Simulator structure.
A. Simulator structure
A simulation is executed by running the SimulatorMain.m script, i.e. type SimulatorMain in MATLAB
command window. The simulator block diagram is presented in Fig. 1.
The simulator is based on the 3GPP long term evolution (LTE) model. The processing in the simulator
is done separately for each OFDM symbol which consist of a number of subcarriers. The number of
subcarriers (Nc) depends on the used bandwidth (for example 512 subcarriers for 5 MHz bandwidth and
1024 for 10 MHz bandwidth). In certain synchronization algorithms, several OFDM symbols are needed
for offset estimation. Therefore, the time domain received signal of each OFDM symbol is placed in a
row of a two-dimensional vector (received_signal_td). There are in total 14 OFDM symbols saved to the
vector since there are 14 OFDM symbols in an LTE subframe. The OFDM symbol is tracked with the
variable ofdm_symbol_count and it runs from 1 to 14.
The frequency and timing offset is applied to the nth subcarrier in the received signal r in the simulator
as
v1
rn = ej2n/N
xnmd hm + n ,
(1)
m=0
where N is the number of subcarriers, is the frequency offset normalized with the subcarrier spacing, d
is the delay of the symbol, x is the transmitted signal and h is the channel impulse response with length
v.
B. Running simulations
Set your group specific simulation parameters in inputs000000.m file:
modulation
bandwidth
channel parameters
imperfections
You may also need to change signal-to-noise ratio (SNR) range (inputs00000.m, line 112) for your
simulations. Feasible SNR range depends on the modulation. Note that the SNR can also be negative.
To adjust the SNR range, run short (e.g. 10-100 frames per SNR point) simulations and verify from the
simulation output file that you got feasible bit error rate and throughput. Run final simulations using 500
frames (1000 frames for Task 2) per SNR point. Use the default values for other input parameters and
set only the imperfection value for each task at a time.
Before running a new simulation, remember to change simulation case name, i.e. delta parameter in
inputs000000.m file (line 13). The simulator prints results in output file located in iod/out folder. For
simulation plots, on an x-axis you should have SNR (dB) points and on y-axis throughput in mega bits
per second (Mbps). To read and plot figures you can apply PlotResults.m file stored in iod/out folder.
Add legend to explain which color indicates the particular curve.
C. MEX-C file compilation (if needed)
Some files in the simulator are written using MEX-C in order to accelerate simulation speed. Current
compilation of MEX-C files are for 64-bit Windows OS. If you wish to use some other OS, compile
required files using mex command, e.g. type mex LSD_KBest_CPP_dma.cpp. MATLAB will produce
an error if some files needed does not exist. Remember, if you change C-files the changes do not take
effect until you compile them.
III. TASK 1: C YCLIC PREFIX AND I/Q
12 TH OF
4
Data
stream
Modulation
/signal
mapping
IDFT
Insert CP
Transmitter
front-end
Channel
Timing
To detector
Channel
estimation
Figure 2.
Integer
freq.
offset
Remove CP
IQ comp.
DFT
Fractional
freq.
offset
Analog
frontend
The I/Q imbalance is assumed frequency-independent. Therefore, a simple compensator can be used
[3], [4]. Calculate the I/Q estimator as
cx
,
(3)
wOP T =
2x
where
1
cx =
x(l)x(l),
L l=1
(4)
1
x(l)x (l)
L l=1
(5)
x =
and L is the estimator block size. Correct the I/Q imbalance with
y(t) = x(t) + wOP T x (t).
(6)
The I/Q imbalance correction can be inserted into the simulator before the FFT operation in the file
rx/TD_to_FD.m. The signal x(l) that is used in the processing is "td_symbol_curr" with the length
Nc+Lcp. You can use the whole length of the block for calculating (4) and (5) as L = N c + Lcp.
Plot the throughput performance:
1) Without I/Q imbalance
2) With I/Q imbalance, given values of g and , no compensation
3) With I/Q imbalance, given values of g and , compensation with (6)
IV. TASK 2: F REQUENCY SYNCHRONIZATION ; TASK DEADLINE 23 RD OF S EPTEMBER
In this task, you will implement the integer frequency offset (IFO) estimation and correction and the
fractional part of the carrier frequency offset (CFO) is also estimated. The corresponding blocks in the
receiver are shown in Fig. 3. The CFO can be divided into the fractional frequency offset (FFO) and
IFO: CF O = F F O + IF O . The FFO is estimated in the time domain [5], [6], [7], [8] and the IFO
estimation is performed in the frequency domain. The IFO estimation functionalities can be inserted in
the file rx/i_synchronization.m.
Experiment with different values of frequency offset (freq_off_val, from magnitudes of 101 to 103 ).
Plot the throughput with different values as well as the throughput with no frequency offset.
Data stream
Modulation
/signal
mapping
IDFT
Insert CP
Transmitter
front-end
Channel
To detector
Timing
Channel
estimation
Figure 3.
Integer
freq. offset
Remove CP
Receiver
front-end
DFT
Fractional
freq.
offset
A. FFO estimation
The FFO can be estimated with the maximum likelihood (ML) estimator as [9]
F F O = 1/2 arg{
Nf Ng
rl,n rl,n+N
},
(7)
l=1 n=1
where Nf is the number of OFDM symbols in a subframe (14), N is the number of subcarriers in an OFDM
symbol (Nc) and Ng is the length of the CP. Apply FFO correction. The FFO estimation functionalities
can be inserted in the file rx/c_synchronization.m. You will need the entire received_signal_td for the
FFO estimation, i.e. all 14 OFDM symbols are used. Estimation can then be done every 14th OFDM
symbol (when ofdm_symbol_count=14).
Correct the FFO with a coefficient for each subcarrier k. The coefficient can be calculated as
f cF F O (k) = ej2F F O k/N .
(8)
B. IFO estimation
The LTE synchronization signals are utilized in the IFO estimation. The synchronization signals are
transmitted in every 5th subframe (in the simulator radio_frame_count 1 and 11) in the 6th and 7th
OFDM symbols (simulator: pil_pre_sta 6 and 7). Therefore, IFO estimation can be only performed in
these subframes. The ML estimation can be applied to the IFO estimation as [9]
IF O = arg max{[ej2iNg /N
(RSSCH,k+i
RP SCH,k+i )(XSSCH,k
XP SCH,k ) ]},
(9)
i
kKSCH
where i is a set of IFOs that are estimated, KSCH include the subcarrier indices with synchronization
signals, RSSCH is the received secondary synchronization signals, RP SCH includes the received primary
synchronization signals, XSSCH includes the transmitted secondary synchronization signals and XP SCH
includes the transmitted primary synchronization signals. The secondary synchronization signals are
transmitted in the 6th OFDM symbol and the primary synchronization signals in the 7th OFDM symbol.
The received signal after the FFT is "rec_symbol_FD". The transmitted synchronization signals can be
extracted with "Data_transmit_temp1(1, prim_synch_ind)". Note that the IFO set i can be from 0 to 31
due to the length of the synchronization signals. The CFO can cause FFT index shift, i.e. you should
correct the impact of the IFO by shifting the frequency domain signal with i that provided the maximum
IF O .
Plot the results from the task in a figure which contains the throughput without frequency offset, with
your group specific frequency offset values and with FFO and IFO correction.
Analyze the results. How much does the performance of the correction functions differ from the ones
with no offset?
Modulation
/signal
mapping
IDFT
Insert CP
Transmitter
front-end
Channel
To detector
Channel
estimation
Figure 4.
Timing
Integer
freq. offset
Remove CP
Receiver
front-end
DFT
Fractional
freq.
offset
Set timing offset parameter (timing_off_val) in inputs000000.m file. How much timing offset can there
be without loss in performance?
The timing estimation is based on the cyclic prefix based method [10], [11]. The estimation functionalities can be placed in the file rx/timing_corr.m. You can process the signal "received_signal_td". The
current received block is denoted with "received_signal_td(ofdm_symbol_count,:)".
Estimate the OFDM symbol start as
= arg max{2|() ()|},
(10)
n+Ng 1
(n) =
r(k)r (k + N )
(11)
|r(k)|2 + |r (k + N )|2 ,
(12)
k=n
n+L1
k=n
where Ng is the length of the CP and = Es /(Es + N 0). Use different values for n and see which
produces the maximum value in (10). Perform timing estimation only in certain OFDM symbols specified
in the template file. Correct the OFDM symbol timing.
Plot the results into a figure which contains a curve without timing offset, curves with your group
specific timing offsets and with/without timing offset corrections.
VI. TASK 4: C HANNEL ESTIMATION AND DECODING ; TASK DEADLINE 10 TH OF O CTOBER
A. Channel estimation
Implement the least squares (LS) channel estimator. Channel estimation can be performed after synchronization as illustrated in Fig. 5.
The template Matlab file LS_chan_est_template.m can be found in the rx folder. You can replace the
command eval(LS_chan_est) with eval(LS_chan_est_template). The LS estimation can be calculated
as
= (FH XH XF)1 FH XH r,
h
(13)
where F is the truncated DFT matrix and X contains the transmitted pilot symbols [12], [13]. Experiment
with different channel lengths, i.e. different sizes of chan_indices. Plot the performance to separate figures:
Data stream
Modulation
/signal
mapping
IDFT
Insert CP
Transmitter
front-end
Channel
To detector
Channel
estimation
Figure 5.
Timing
Integer
freq. offset
Remove CP
Receiver
front-end
DFT
Fractional
freq.
offset
IX. F EEDBACK
Your last task is to give constructive feedback about the course work so that we can improve it in the
future. Were the tasks too easy or perhaps too hard? Did you feel the exercise gave you new knowledge
or backup the theory you learned during the lectures?
R EFERENCES
[1] E. Dahlman, S. Parkvall, J. Skld, and P. Beming, 3G Evolution HSPA and LTE for Mobile Broadband. San Diego, CA: Academic
Press is an imprint of Elsevier, 2007.
[2] D. Tandur and M. Moonen, Joint adaptive compensation of transmitter and receiver iq imbalance under carrier frequency offset in
OFDM-based systems, IEEE Trans. Signal Process., vol. 55, no. 11, pp. 52465252, Nov. 2007.
[3] L. Anttila, M. Valkama, and M. Renfors, Circularity-based I/Q imbalance compensation in wideband direct-conversion receivers,
IEEE Trans. Veh. Technol., vol. 57, no. 4, pp. 20992113, Jul. 2008.
[4] , Blind moment estimation techniques for I/Q imbalance compensation in quadrature receivers, in Proc. IEEE Int. Symp. Pers.,
Indoor, Mobile Radio Commun., Helsinki, Finland, Sep. 1114 2006, pp. 15.
[5] M. Speth, S. Fechtel, G. Fock, and H. Meyr, Optimum receiver design for OFDM-based broadband transmission part II: Case study,
IEEE Trans. Commun., vol. 49, no. 4, pp. 571578, 2001.
[6] F. Wu and M. Abu-Rgheff, Time and frequency synchronization techniques for OFDM systems operating in gaussian and fading
channels: A tutorial, in The 8th Annual Postgraduate Symposium on The Convergence of Telecommunications, Networking and
Broadcasting (PGNET), Liverpool, UK, Jun. 2829 2007, pp. 16.
[7] D.-C. Chang, Effect and compensation of symbol timing offset in OFDM systems with channel interpolation, IEEE Trans. Broadcast.,
vol. 54, no. 4, pp. 761770, Dec. 2008.
[8] J. van de Beek, M. Sandell, and P. Borjesson, ML estimation of time and frequency offset in OFDM systems, IEEE Trans. Signal
Process., vol. 45, no. 7, pp. 18001805, Jul. 1997.
[9] Q. Wang, C. Mehlfhrer, and M. Rupp, Carrier frequency synchronization in the downlink of 3GPP LTE, in Proc. IEEE Int. Symp.
Pers., Indoor, Mobile Radio Commun., Istanbul, Turkey, Sep. 2630 2010, pp. 939944.
[10] K. Manolakis and V. Jungnickel, Synchronization and cell search for 3GPP LTE, in 13th International OFDM Workshop (InOWo08),
Hamburg, Germany, Aug. 2728 2008, pp. 15.
[11] K. Manolakis, D. Gutierrez E., V. Jungnickel, W. Xu, and C. Drewes, A closed concept for synchronization and cell search in 3GPP
LTE systems, in Proc. IEEE Wireless Commun. and Networking Conf., Budapest, Hungary, Apr. 58 2009, pp. 16.
[12] S. M. Kay, Fundamentals of Statistical Signal Processing: Estimation Theory. Englewood Cliffs, NJ, USA: Prentice-Hall, 1993.
[13] J.-J. van de Beek, O. Edfors, M. Sandell, S. Wilson, and P. Borjesson, On channel estimation in OFDM systems, in Proc. IEEE Veh.
Technol. Conf., vol. 2, Chicago, IL, USA, Jul. 2528 1995, pp. 815819.