OAI UE overview Wilson W. K. Thong (ASTRI), Fabrice Nabet, Haithem Bilel (TCL), Florian Kaltenberger, Raymond Knopp (Eurecom) OAI workshop 2017 BUPT, Beijing, April 27 th 2017
Agenda Overview of LTE UE Attach Procedure OAI-UE Threading Structure & Timing Walk through the OAI-UE Codes 2
Overview of LTE UE Attach Procedure 3
Overview of LTE UE Attach Procedure UE Power On Downlink synchronization (PSS/SSS/MIB, TS36.211) Listening broadcast information (TS36.331) PLMN Selection and Cell Selection (TS36.304) During UE Attach (TS23.401) Random access and uplink synchronization (TS36.300) RRC connection setup (TS36.331) UE authentication (TS24.301) NAS security setup (TS24.301) RRC security setup (TS36.331) UE capability enquiry (TS36.331) RRC connection reconfiguration (TS36.331) EPS bearer establishment (TS24.301) UE IP Address Allocated (TS24.301) 4
Overview : UE Attachment Uplink unsynch UE enb MME Msg1: PRACH Uplink Synchronized Msg2: RAR Msg3: RRC Connection Request Random Access Succeeded Msg4: RR Connection Setup RRC Connection Setup Complete EMM Attach Request ESM PDN Connectivity Request EMM Authentication Request Progress Achieved UE Authenticated NAS Integrity And Ciphering Configured RRC Integrity And Ciphering Configured IP Address Allocated QoS negotiated Radio Configured (PHY,MAC, RLC,SRB,DRB) EMM Authentication Response NAS Security Mode Command NAS Security Mode Complete Initial Context Setup Request RRC Security Mode Command RRC Security Mode Complete RRC UE Capability Enquiry RRC UE Capability Information EMM Attach Accept ESM Activate Default EPS Bearer Context Request UE Capability Info Indication RRC Connection Reconfiguration RRC Connection Reconfiguration Complete Initial Context Setup Response EMM Attach Complete Protocol Message Timing Attach Succeeded Date Time Configured ESM Activate Default EPS Bearer Context Accept EMM Information : Time Zone and Time / Daylight Saving Time UL/DL Data UL/DL Data 7
OAI-UE Threading Structure 8
OAI-UE Threading Structure 9
OAI-UE Threading Structure Two Parallelized threads are running on physical layer One Thread for Odd subframes processing, the second thread for Even subframes processing Timing Constraint 2ms!!! Each Thread UE_thread_RxNTxNp4 is responsible of : downlink subframe decoding (#Subframe N) uplink subframe encoding (#Subframe N+4) Three Cores are fully used for the whole PHY processing Core 0: Samples Acquisition / Core 1: Processing of Even Subframes / Core 2: Processing of Odd Subframes
OAI-UE Timing Measurement SISO 5MHz 10MHz 20MHz MIMO (2CWs) SISO MIMO (2CWs) SISO MIMO (2CWs) FFT 3 ~45 3 ~45 3 ~45 5 70 5 ~70 8 ~112 ChanEst 10 40 10 40 5 20 25 100 11 45 50 200 Front End Processing Pdcch Decoding Pdsch Processing : Channel Scale/Channel Compensation LLRs Computation 85 85 62 170 120 310 36 80 65 80 90 80 4 ~55 4 ~55 6 ~80 5 ~65 8 ~104 10 130 1 ~15 30 ~400 2 ~25 65 ~845 3 ~39 130 1690 Turbo Decoding 60 180 60 360 60 360 60 720 60 720 60 1440 Full Channel Decoding unscrambling/rate Matching/deinterleaving/turbo decoding Subframe Processing 300 550 665 1296 1330 2600 450us < 2ms 1150us < 2ms 850us < 2ms 2456us!!! 1650us < 2ms 4810us!!!
OAI-UE Timing Measurement Front End Processing 20MHz SISO MIMO Percentage SISO MIMO 120 310 7,3% 6,5% Pdcch Decoding 90 80 5,45% 1,66% Pdsch Processing : Channel Scale/Channel Compensation LLRs Computation Full Channel Decoding unscrambling/rate Matching/deinterleaving/turbo decoding Subframe Decoding 104 130 6,3% 2,7% 39 1690 2,36% 35,13% 1330 2600 80,6% 54% 1650 4810 Critical Blocks: Channel Decoding (~2600 us) Unscrambling Rate matching Deinterleaving Turbo Decoding LLRs Computation (Mimo) (~1700 us) Potential Optimization: SW Optimization: Phy Processing Parallelization More efficient implementation (AVX512 / AVX2) depending on GPP (Xeon Phi etc) HW Optimization: Offload channel decoding on HW accelerator Offload LLRs computation on HW accelerator Estimation of time usage is needed
Walk through the OAI-UE Codes 13
Downlink Synchronization Initial To know where is subframe #0 Search PSS 0..2 position Search SSS 0..167 in 4 possibilities: Normal CP + FDD Normal CP + TDD Extended CP + FDD Extended CP + TDD FDD TDD Figure from: Figure 7.2 7.3 of LTE the UMTS long term evolution : 14 from theory to practice / Stefania Sesia, Issam Toufik, Matthew Baker. 2nd ed.
Downlink Synchronization Initial Check PBCH CRC to confirm if PSS/SSS is real Re-synchronize USRP Rx timing 1st capture start capture length = 10ms #4 #5 #6 #7 #8 #9 #0 #1 #2 #3 2nd capture start rx offset capture length = rx offset (not used) 3rd capture start capture length = 10ms #0 #1 #2 #3 #4 #5 #6 #7 #8 #9 rx offset = 0 Related code location: initial_sync() in openair1/phy/lte_transport/initial_sync.c, UE_thread() in targets/rt/user/lte-ue.c 15
Downlink Synchronization Continuous Calculate IFFT(channel estimation) i.e. channel impulse response (CIR) Estimate time drift (rx_offset)from CIR peak Correct the time drift by time shifting OAI-UE frame start, estimate rx_offset Actual frame start #9 #0... #9 #0 #1 OAI-UE frame start, estimate rx_offset rx_offset Actual frame start #0 #1... #9 #0 #1... overwrite by rx_offset Related code location: OAI-UE frame start adjusted lte_adjust_synch()in openair1/phy/lte_estimation/lte_adjust_sync.c UE_thread() in targets/rt/user/lte-ue.c 16
Downlink Synchronization Flow Estimate rx_offset in UE_thread_rx() Affect USRP read operation in UE_thread() 17
Listening Broadcast Information SIB1 PHY/MAC detects SI-RNTI DCI and PDSCH RRC parses the SIB1 information element Configure PHY/MAC accordingly o TDD UL/DL configuration o Other SIBx scheduling information 18
Listening Broadcast Information SIB1 Overall timing diagram UE_thread() subframe 5 subframe 6 slot 10 slot 11 slot 12 slot 13 l = 0 l = 6 l = 0 l = 6 subframe 7 slot 14 slot 15 subframe 5 slot_fep pdcch PHY_var_UE_g UE_thread_rx() pdsch (1) pdsch (2) ue_scheduler SI receiving subframe 5 ue_decode_si UE_mac_inst mac_rrc_data_ind RRC_mac_inst rrc_ue_task() nas_ue_task() rrc_ue_task nas_ue_task TASK_MAC_UE TASK_RRC_UE RRC_MAC_BCCH_DATA_IND TASK_RRC_UE TASK_NAS_UE NAS_CELL_SELECTION_CNF 19
Listening Broadcast Information SIB1 PHY/MAC detects SI-RNTI DCI slot fep (front end processor) = FFT + channel estimation + frequency offset estimation UE_thread() subframe 5 subfram slot 10 slot 11 slot 12 UE_thread_rx() PHY_var_UE_g Related code location: l = 0 l = 6 l = 0 l = 6 Detected SI-RNTI DCI slot_fep pdcch pdsch (1) pdsch (2) phy_procedures_ue_rx()in openair1/sched/phy_procedures_lte_ue.c 20 subfram
Listening Broadcast Information SIB1 PHY/MAC detects SI-RNTI PDSCH pdsch (1) = RE demap + channel compensation + spatial decode + QPSK demodulation pdsch (2) = unscrambling + Turbo decoding subframe 5 subframe 6 subframe 7 slot 11 slot 12 slot 13 slot 14 slot 15 l = 6 l = 0 l = 6 UE_thread_rx() slot_fep pdcch pdsch (1) pdsch (2) subframe 5 SI receiving ue_scheduler Related code location: ue_decode_si mac_rrc_data_ind Detected SI-RNTI PDSCH subframe 5 rx_pdsch()in openair1/phy/lte_transport/dlsch_demodulation.c 21 TASK_MAC_UE TASK_RRC_UE RRC_MAC_BCCH_DATA_IND
Listening Broadcast Information SIB1 RRC parses the SIB1 information element Configure PHY/MAC accordingly slot_fep pdcch pdsch (1) pdsch (2) subframe 5 UE_thread_rx() ue_scheduler ue_decode_si mac_rrc_data_ind subframe 5 Parse SIB1 Configure PHY/MAC SI receiving rrc_ue_task() TASK_MAC_UE TASK_RRC_UE RRC_MAC_BCCH_DATA_IND rrc_ue_task nas_ue_task() TASK_RRC_UE TASK_NAS_UE NAS_CELL_SELECTION_CNF Related code location: nas_ue_task decode_sib1()in openair2/rrc/lite/rrc_ue.c 22
UE cell synchronization 27/04/2017 - EURECOM RESEARCH - p 23
LTE UE Synchronization Procedures Cell Search comprises 1. Timing and frequency synchronization with the cell using the primary synchronization reference signal. This also gives the Cell ID group N ID (2) (0,1,2) 2. Cell ID N ID (1) (0,,166) and Frame type (FDD/TDD, Normal/Extended Prefix) determination from secondary synchronization reference signals 3. Demodulation of PBCH (using N ID Cell = 3N ID (1) + N ID (2) ) to receive basic system information during steady-state reception 1. N RB DL (cell bandwidth) 2. PHICH-config (to allow PDCCH demodulation, for system information) 3. Frame number (8 bits from payload, 2 bits from redundancy version) 4. Antenna configuration (1,2,4 from CRC mask) 27/04/2017 24
Initial Timing/Frequency Acquisition (Synchronization Signals, FDD Normal CP) 10 ms Subframe 0 Subframe 1 Subframe 4 Subframe 5 Subframe 9 Frequency (PRBs) Primary (Y) and Secondary B) Synchronization Signals (first half) PBCH Time (symbols) Primary(Y) and Secondary(B) Synchronization Signals (2 nd half) 27/04/2017 25
Primary Synchronization Signal (PSS) Zadoff-Chu root-of-unity sequence has excellent auto-correlation properties and is very tolerant to frequency-offsets Autocorrelation sequence Real component (time-domain u=25) Imag component (time-domain, u=25) 27/04/2017 26
Primary Synchronization RX Correlation of 3 primary sequences (d* u (-n)) with received signal. Each enb (or sector) has different sequence => Reuse pattern of 3 for different enb or sectors (N ID (2) ) Primary Purpose: Determine start of frame Alternate purposes: Channel estimation for SSS/PBCH and frequency offset estimation 27/04/2017 27
Secondary Synchronization Signal (SSS) Purpose: determine frame type and cell ID N ID (1) Implemented as BPSK-modulated interleaved sequence of two length-31 binary m-sequences (m=31) with cyclic shifts m 0 and m 1. and scrambled by the two different scrambling sequences Results in 167 possible BPSK sequences for each of subframe 0 and 5 The receiver must perform correlations with all 167 sequences and find the most likely transmitted sequence. It can use the output of the primary sequence correlation as a rough channel estimate to improve detection probability Position relative to PSS allows for frame type determination 27/04/2017 28
Secondary Synchronization RX Hypothesis: one of 4 frame types TDD/FDD, normal/extended prefix => gives position in samples of SSS with respect to PSS detected in primary synchronization Use channel estimate (partially coherent) from PSS and quantized uniform phase offset to compensate residual frequency offset (PSS/SSS not in same symbol) and amplitudes in SSS symbol Correlate with 167 out of 167 * 3 sequences (167 per PSS N ID (2) ) of length 62 in each of slots 0 and 10 Choose sequence which has highest coherent correlation This has to be done with 2 different assumptions (subframe 0 or subframe 5 is first in RX buffer), or we just wait until we receive an RX frame in the correct order (i.e. when subframe 0 falls in the first 5 ms of the RX buffer) 27/04/2017 29
Summary 27/04/2017 30
PBCH Detection Detection of the PBCH requires the following steps 1. Generation of the cell-specific reference signals based on the cell ID derived from SSS detection 2. Performing channel estimation for the 4 symbols of the PBCH 3. Extracting the PBCH reference elements 4. Applying the conjugated channel estimates to the received reference elements 5. Channel decoding 27/04/2017 31
Generic OFDM Receiver I[n] Digital Baseband Inputs Q[n] Prefix Extraction FFT I[k] Q[k] Channel Compensation I[k] Q[k] LLR Unit Channel Decoding Pilot extraction Broadband Channel Estimates To timing (DAQ) and frequency correction units, and I/Q imbalance Channel Estimation 27/04/2017 32
Key linear processing operations which can be vectorized easily with SIMD Inner-products (synchronization, projection operations) Componentwise products (compensation/equalization, channel estimation) FFT/IFFTs (OFDM TX/RX) Peak search in vector (synchronization) Vector addition, subtraction, energy, absolute value 27/04/2017 33