物理层 SDR 实践 2,284 字

SDR:srsLTE:解码 PDSCH

本示例由源码 srsLTE\examples\Pdschue.c 实现。其功能是从文件或射频板读取 OFDMA 数据I/Q 形式并解码 PDSCH。但在解码 PDSCH 之前,你需要完成许多准备工作,因此源码看起来会比你想象的复杂得多。不过…

采集:2026-11-18T02:13:00+08:00 · 查看英文原文 ↗

原始来源:https://www.sharetechnote.com/html/SDR_srsLTE_Example_Pdsch_Ue.html

正文

本示例由源码 srsLTE\examples\Pdsch_ue.c 实现。其功能是从文件或射频板读取 OFDMA 数据(I/Q 形式)并解码 PDSCH。但在解码 PDSCH 之前,你需要完成许多准备工作,因此源码看起来会比你想象的复杂得多。不过,对于理解 UE 中下行信号检测与解码的完整流程而言,这是一个非常好的示例。

只需设置一个简单的标志,就能让该功能从文件(即无需任何射频硬件)或直接从射频硬件(例如 USRP)解码 PDSCH。

由于我的主要目的是理解代码细节,而不是搭建可工作的硬件,因此我选择深入研究从文件解码 PDSCH 的那部分代码。我简化了与该流程直接相关的代码,去掉了所有错误处理部分,只保留与解码流程直接相关的代码。

希望这份总结和补充注释能帮助你理解项目中的原始源码。

  • 情形 1:从文件解码 PDSCH
  • 结果
  • 日志中的数字与 LTE 规范一致吗?
  • 参考资料 UE 无法直接解码 PDSCH。它必须先找到小区和帧定时,然后读取 MIB 获得帧号。只有在这之后,它才能查找属于自己的 PDCCH,并解码 PDCCH 所指向的 PDSCH。下面的 main() 函数正是以一个小型状态机执行这一链条,状态机包含两个状态:DECODE_MIB 和 DECODE_PDSCH。

我们先用文字走一遍,再看代码。前四个调用用于准备资源:用于同步的文件读取器、MIB 解码器、下行解码器和 RNTI。随后 while 循环每轮读取一个子帧。当取到一个对齐的子帧时,调用 srslte_ue_sync_get_buffer 返回 1。在 DECODE_MIB 状态下,循环尝试子帧 0 中的 PBCH,一旦 MIB 解码成功就转入 DECODE_PDSCH。在 DECODE_PDSCH 状态下,它按配置的 RNTI 解码下行,并用滑动平均更新 RSRQ、RSRP 和噪声。子帧 9 之后,它递增 SFN,并在 1024 处回绕。

源码清单 —— srsLTE 项目中 pdsch_ue.c 的 main(),经作者简化,作者注释以绿色显示

/** * * \section COPYRIGHT * * Copyright 2013-2015 Software Radio Systems Limited * * \section LICENSE * * This file is part of the srsLTE library. * * srsLTE is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version. * * srsLTE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * A copy of the GNU Affero General Public License can be found in * the LICENSE file in the top-level directory of this distribution * and at http://www.gnu.org/licenses/. * */ int main(int argc, char **argv) { // Initialize all the resources that is required to perform Synchronization. When you decode PDSCH from file, // the main role of this function is to read data from pdsch file and store it into an internal array to be used in // other process. srslte_ue_sync_init_file(&ue_sync, prog_args.file_nof_prb, prog_args.input_file_name, prog_args.file_offset_time, prog_args.file_offset_freq) // Initialize all the resources that is required for decode MIB. Initialization of OFDM symbol array and Channel // Estimation resource are done in this function as well. srslte_ue_mib_init(&ue_mib, cell); // This function initialize all the resources (Arrays, Channels) to decode all the downlink channels (PCFICH, // PHICH, PDCCH, PDSCH). A lot of initialization routine for ofdm, channel estimation, and other physical channels // ( (PCFICH, PHICH, PDCCH, PDSCH) are called within this function srslte_ue_dl_init(&ue_dl, cell); // Configure downlink receiver for the RNTI specied by the option flag srslte_ue_dl_set_rnti(&ue_dl, prog_args.rnti); // Set initial CFO for ue_sync srslte_ue_sync_set_cfo(&ue_sync, cfo); // Decode channels for each subframe. while (!go_exit && (sf_cnt < prog_args.nof_subframes || prog_args.nof_subframes == -1)) { // Check if Sync signal is detected. It return 1 when sync detected, otherwise it return 0. ret = srslte_ue_sync_get_buffer(&ue_sync, &sf_buffer); /* srslte_ue_sync_get_buffer returns 1 if successfully read 1 aligned subframe */ // if Sync is not detected (i.e, ret == 0) this part (Channel Decode) is skipped and go to next loop // try srslte_ue_sync_get_buffer() again. if (ret == 1) { switch (state) { case DECODE_MIB: if (srslte_ue_sync_get_sfidx(&ue_sync) == 0) { srslte_pbch_decode_reset(&ue_mib.pbch); //Detect PBCH and decode MIB n = srslte_ue_mib_decode(&ue_mib, sf_buffer, bch_payload, NULL, &sfn_offset) // When PBCH is decoded, set state = DECODE_PDSCH, so that the routine decode PDSCH in next loop state = DECODE_PDSCH; } break; case DECODE_PDSCH: if (decode_pdsch) { INFO("Attempting DL decode SFN=%d\n", sfn); if (prog_args.rnti != SRSLTE_SIRNTI) { // if rnti option flag is not SI RNTI, perform regular dl decoding n = srslte_ue_dl_decode(&ue_dl, &sf_buffer[prog_args.time_offset], data, srslte_ue_sync_get_sfidx(&ue_sync)); } else { // if rnti option flag is set to be SI RNTI, perform regular dl decoding with the calculated rv // RV for SIB1 is predefined uint32_t k = (sfn/2)%4; uint32_t rv = ((uint32_t) ceilf((float)1.5*k))%4; n = srslte_ue_dl_decode_rnti_rv(&ue_dl, &sf_buffer[prog_args.time_offset], data, srslte_ue_sync_get_sfidx(&ue_sync), SRSLTE_SIRNTI, rv); } nof_trials++; rsrq = SRSLTE_VEC_EMA(srslte_chest_dl_get_rsrq(&ue_dl.chest), rsrq, 0.1); rsrp = SRSLTE_VEC_EMA(srslte_chest_dl_get_rsrp(&ue_dl.chest), rsrp, 0.05); noise = SRSLTE_VEC_EMA(srslte_chest_dl_get_noise_estimate(&ue_dl.chest), noise, 0.05); nframes++; } break; } if (srslte_ue_sync_get_sfidx(&ue_sync) == 9) { // if subframe index == 9, increment SFN number by 1 sfn++; if (sfn == 1024) { // if SFN == 1024, initialize SFN = 0 sfn = 0; printf("\n"); ue_dl.pkt_errors = 0; ue_dl.pkts_total = 0; ue_dl.nof_detected = 0; nof_trials = 0; } } } else if (ret == 0) { // if Sync is not detected, do following printf("Finding PSS... Peak: %8.1f, FrameCnt: %d, State: %d\r", srslte_sync_get_peak_value(&ue_sync.sfind), ue_sync.frame_total_cnt, ue_sync.state); } sf_cnt++; } // end of while() }
  • 许可证头来自 srsLTE 源文件,是 GNU Affero 通用公共许可证第 3 版或更高版本的文本。
  • SI RNTI 分支按 k = (sfn/2)%4 和 rv = ceil(1.5 x k)%4 计算 SIB1 的冗余版本。这与 36.321 第 5.3.1 节一致:对于 SystemInformationBlockType1,RVK = ceiling(3/2 x k) modulo 4,k = (SFN/2) modulo 4。因此 SIB1 依次使用冗余版本 0、2、3 和 1。
  • 代码行 n = srslte_ue_mib_decode(…) 末尾缺少分号,因此该清单按现状无法编译。可将其视为简化清单中的一处笔误,此处按作者原文保留。
  • SRSLTE_VEC_EMA 执行指数滑动平均。RSRQ 的权重为 0.1,RSRP 和噪声的权重为 0.05,因此单个子帧只会让各估计值略微变化。
  • SFN 在 1024 处回绕,因为 LTE 中 SFN 的取值范围是 0 到 1023。
  • UE 先解码 MIB 再解码 PDSCH:在子帧 0 的 PBCH 解码成功之前,状态机一直停留在 DECODE_MIB。
  • 普通 RNTI 与 SI-RNTI 走不同分支:对于 SI-RNTI,代码需要根据 SFN 计算 SIB1 的冗余版本。
  • 代码自行跟踪 SFN:它在 MIB 之后统计子帧 9 的边界,而不是再次解码 PBCH。 代码构建成功后,即可按下面的示例运行。(如果你不熟悉如何安装并构建 srsLTE 项目,请参阅 How to build srsLTE 页面。)

注 1:“pdsch.out” 是包含 LTE eNB 下行帧 I/Q 数据的文件(我用 pdsch_enodeb 示例程序生成了该文件)。

注 2:请注意必须如下所示用 -r 选项指定 C_RNTI。你必须使用 RNTI 值 1234,因为该值在示例中是硬编码的。

下面的方框给出了命令及其简短输出。程序先打印从 MIB 中获知的小区信息,然后输出一行运行摘要。

抓取 —— 作者运行的 pdsch_ue 解码 pdsch.out 的控制台输出

# ~/srsLTE/build/srslte/examples$ ./pdsch_ue -i "pdsch.out" -n 10 -r 1234 linux; GNU C++ version 5.3.1 20160413; Boost_105800; UHD_003.009.004-release - Cell ID: 0 - Nof ports: 1 - CP: Normal - PRB: 25 - PHICH Length: Normal - PHICH Resources: 1 - SFN: 0 Decoded MIB. SFN: 0, offset: 0 CFO: +0.00 kHz, SNR: 139.3 dB, PDCCH-Miss: 20.00%, PDSCH-BLER: 0.00% Bye

这行摘要需要一点说明。139.3 dB 的 SNR 远超任何真实接收机的水平。这是因为 pdsch.out 直接来自 pdsch_enodeb,两个程序之间没有加入任何信道或噪声。所以这次运行检验的是解码链路,而不是接收机性能。

就到这里,现在开始玩吧!

如果你想获得关于生成与解码过程的更详细信息,可以如下使用 -v 选项。

抓取 —— 作者运行的 pdsch_enodeb 生成 pdsch.out 的详细控制台输出

#~/srsLTE/build/srslte/examples$ ./pdsch_enodeb -o "pdsch.out" -n 10 -m 9 -v linux; GNU C++ version 5.3.1 20160413; Boost_105800; UHD_003.009.004-release [INFO]: Indexing 200 REGs. CellId: 0, 25 PRB, CP: Normal [INFO]: PCFICH allocating 4 regs. CellID: 0, PRB: 25 [INFO]: Creating 4 PHICH mapping units. Normal length, Ng=1.00 [INFO]: Init PDCCH REG space CFI 1. 27 useful REGs (3 CCEs) [INFO]: Init PDCCH REG space CFI 2. 108 useful REGs (12 CCEs) [INFO]: Init PDCCH REG space CFI 3. 180 useful REGs (20 CCEs) [INFO]: Init PDCCH: Max bits: 1440, 1 ports. [INFO]: Init PDSCH: 1 ports 25 PRBs, max_symbols: 4200 - Resource Allocation Type: Type 0 + Resource Block Group Size: 2 + RBG Bitmap: 0x1fff - Modulation and coding scheme index: 9 - HARQ process: 0 - New data indicator: No - Redundancy version: 0 - TPC command for PUCCH: -- - PRB Bitmap Assignment 0st slot: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - PRB Bitmap Assignment 1st slot: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - Number of PRBs: 25 - Modulation type: QPSK - Transport block size: 4008 Type new MCS index and press Enter: [INFO]: SF: 0, Generating 0 random bits [INFO]: SF: 1, Generating 0 random bits [INFO]: Putting DCI to location: n=8, L=3 [INFO]: CB Segmentation: TBS: 4008, C=1, C+=1 K+=4032, C-=0, K-=0, F=0, Bp=4032 [INFO]: Encoding PDSCH SF: 1, Mod QPSK, NofBits: 4008, NofSymbols: 3150, NofBitsE: 6300, rv_idx: 0 [INFO]: CB#0: cb_len: 4032, rlen: 4032, wp: 0, rp: 0, E: 6300 [INFO]: Last CB, appending parity: 4008 from 0 and 24 to 4008 [INFO]: END CB#1: wp: 6300, rp: 4032 [INFO]: SF: 2, Generating 4008 random bits ....

同理,你也可以获得关于解码结果的更详细信息,如下所示。

抓取 —— 作者运行的 pdsch_ue 解码 pdsch.out 的详细控制台输出

# ~/srsLTE/build/srslte/examples$ ./pdsch_ue -i "pdsch.out" -n 10 -r 1234 -v linux; GNU C++ version 5.3.1 20160413; Boost_105800; UHD_003.009.004-release [INFO]: Offseting input file by 0 samples and 0.0 kHz [INFO]: Indexing 200 REGs. CellId: 0, 25 PRB, CP: Normal [INFO]: PCFICH allocating 4 regs. CellID: 0, PRB: 25 [INFO]: Creating 4 PHICH mapping units. Normal length, Ng=1.00 [INFO]: Init PDCCH REG space CFI 1. 27 useful REGs (3 CCEs) [INFO]: Init PDCCH REG space CFI 2. 108 useful REGs (12 CCEs) [INFO]: Init PDCCH REG space CFI 3. 180 useful REGs (20 CCEs) [INFO]: Init PDCCH: Max bits: 1440, 1 ports. [INFO]: Init PDSCH: 1 ports 25 PRBs, max_symbols: 4200 [INFO]: Entering main loop... [INFO]: Reading 5760 samples. sf_idx = 0 [INFO]: Decoded PBCH: src=0, dst=0, nb=1, sfn_offset=0 [INFO]: MIB decoded: 0 - Cell ID: 0 - Nof ports: 1 - CP: Normal - PRB: 25 - PHICH Length: Normal - PHICH Resources: 1 - SFN: 0 Decoded MIB. SFN: 0, offset: 0 [INFO]: Reading 5760 samples. sf_idx = 1 [INFO]: Attempting DL decode SFN=0 [INFO]: Decoded CFI=3 with correlation 32.00, sf_idx=1 [INFO]: Found DCI nCCE: 8, L: 3, n_bits=27 [INFO]: Format1 PDSCH Scheduling - Resource Allocation Type: Type 0 + Resource Block Group Size: 2 + RBG Bitmap: 0x1fff - Modulation and coding scheme index: 9 - HARQ process: 0 - New data indicator: No - Redundancy version: 0 - TPC command for PUCCH: -- - PRB Bitmap Assignment 0st slot: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - PRB Bitmap Assignment 1st slot: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - Number of PRBs: 25 - Modulation type: QPSK - Transport block size: 4008 [INFO]: CB Segmentation: TBS: 4008, C=1, C+=1 K+=4032, C-=0, K-=0, F=0, Bp=4032 [INFO]: Decoding PDSCH SF: 1, RNTI: 0x1234, Mod QPSK, TBS: 4008, NofSymbols: 3150, NofBitsE: 6300, rv_idx: 0, C_prb=25 [INFO]: CB#0: cb_len: 4032, rlen: 4032, wp: 0, rp: 0, E: 6300, n_iters=1 [INFO]: END CB#1: wp: 4032, rp: 6300 [INFO]: CAUTION!! Received all-zero transport block [INFO]: TB decoded OK [INFO]: Reading 5760 samples. sf_idx = 2 [INFO]: Attempting DL decode SFN=0 [INFO]: Decoded CFI=3 with correlation 32.00, sf_idx=2 [INFO]: Found DCI nCCE: 8, L: 3, n_bits=27 [INFO]: Format1 PDSCH Scheduling - Resource Allocation Type: Type 0 + Resource Block Group Size: 2 + RBG Bitmap: 0x1fff - Modulation and coding scheme index: 9 - HARQ process: 0 - New data indicator: No - Redundancy version: 0 - TPC command for PUCCH: -- - PRB Bitmap Assignment 0st slot: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - PRB Bitmap Assignment 1st slot: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - Number of PRBs: 25 - Modulation type: QPSK - Transport block size: 4008 [INFO]: CB Segmentation: TBS: 4008, C=1, C+=1 K+=4032, C-=0, K-=0, F=0, Bp=4032 [INFO]: Decoding PDSCH SF: 2, RNTI: 0x1234, Mod QPSK, TBS: 4008, NofSymbols: 3150, NofBitsE: 6300, rv_idx: 0, C_prb=25 [INFO]: CB#0: cb_len: 4032, rlen: 4032, wp: 0, rp: 0, E: 6300, n_iters=1 [INFO]: END CB#1: wp: 4032, rp: 6300 [INFO]: TB decoded OK [INFO]: Reading 5760 samples. sf_idx = 3 [INFO]: Attempting DL decode SFN=0 [INFO]: Decoded CFI=3 with correlation 32.00, sf_idx=3 [INFO]: Found DCI nCCE: 8, L: 3, n_bits=27 [INFO]: Format1 PDSCH Scheduling - Resource Allocation Type: Type 0 + Resource Block Group Size: 2 + RBG Bitmap: 0x1fff - Modulation and coding scheme index: 9 - HARQ process: 0 - New data indicator: No - Redundancy version: 0 - TPC command for PUCCH: -- - PRB Bitmap Assignment 0st slot: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - PRB Bitmap Assignment 1st slot: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - Number of PRBs: 25 - Modulation type: QPSK - Transport block size: 4008 ....

把两份详细日志并排对照,可以看到它们逐行吻合。eNB 侧将 DCI 放在 n=8、L=3 的位置,UE 侧在 nCCE 8、L 3 处找到 DCI。两侧都使用 Format 1、资源分配类型 0、MCS 索引 9、QPSK 以及 4008 比特的传输块。eNB 侧为子帧 1 生成 0 个随机比特,UE 侧则报告子帧 1 的传输块全为零。从子帧 2 开始,eNB 生成 4008 个随机比特,UE 也就不再给出该告警。

  • 文件中不含噪声:这正是 SNR 估计高达 139.3 dB 的原因。
  • 两份详细日志从两端描述了相同的子帧:DCI 位置、格式、MCS 与 TBS 均一致。
  • 子帧 1 出现全零告警是正常的:eNB 侧为该子帧生成了 0 个随机比特。 详细日志打印了大量数字,却没有说明它们的来源。这些数字都由 MIB 和 DCI 中的三项设置决定:25 PRB、单天线端口和常规 CP,再加上 CFI 3 与 MCS 9。因此我们可以对照 36.211、36.212 和 36.213 检查日志,下表中逐行做了这件事。若改变带宽或 MCS,你可以重新做同样的推算。
日志行 数字的来源
Creating 4 PHICH mapping units. Normal length, Ng=1.00 36.211 第 6.9 节给出常规 CP 下 PHICH 组数为 ceiling(Ng x NRB/8)。取 Ng = 1、25 个 RB,即 ceiling(3.125) = 4。
PCFICH allocating 4 regs PCFICH 始终占用 4 个 REG,用于承载其 16 个 QPSK 符号。
Init PDCCH REG space CFI 1. 27 useful REGs (3 CCEs) 由于存在 CRS,符号 0 每 RB 有 2 个 REG,共 50 个 REG。PCFICH 占用 4 个,4 个 PHICH 组占用 12 个,剩余 34 个。一个 CCE 为 9 个 REG,因此可容纳 3 个 CCE,占用 27 个 REG。
Init PDCCH REG space CFI 2. 108 useful REGs (12 CCEs) 在单天线端口下,符号 1 不含 CRS,每 RB 有 3 个 REG,因此增加 75 个 REG。34 + 75 = 109 个 REG 可提供 12 个 CCE,占用 108 个 REG。
Init PDCCH REG space CFI 3. 180 useful REGs (20 CCEs) 符号 2 再增加 75 个 REG。109 + 75 = 184 个 REG 可提供 20 个 CCE,占用 180 个 REG。
Init PDSCH: 1 ports 25 PRBs, max_symbols: 4200 25 PRB x 12 个子载波 x 14 个符号 = 一个子帧内 4200 个 RE。这是在扣除控制区域和 CRS 之前的上限。
RBG Bitmap: 0x1fff, Resource Block Group Size: 2 36.213 表 7.1.6.1-1 规定 11 至 26 个 RB 时 RBG 大小为 P = 2。于是 25 个 RB 构成 13 个 RBG,0x1fff 置位全部 13 个比特,因此 25 个 PRB 全部被分配。
Found DCI nCCE: 8, L: 3, n_bits=27 FDD 下 25 个 RB 的 Format 1 共 27 比特。资源分配占用 1 个头部比特和 13 个位图比特,MCS 占 5 比特,HARQ 进程 3 比特,NDI 1 比特,RV 2 比特,TPC 2 比特。L = 3 表示聚合等级 8,即 2 的 3 次方,因此 PDCCH 使用 CCE 8 至 CCE 15 共 8 个 CCE。这可以容纳在 CFI 3 的 20 个 CCE 之内。
Modulation type: QPSK, Transport block size: 4008 MCS 9 在 36.213 表 7.1.7.1-1 中对应 QPSK 和 ITBS 9。表 7.1.7.2.1-1 给出 ITBS 9、25 个 PRB 时为 4008 比特。
NofSymbols: 3150, NofBitsE: 6300 CFI 3 为 PDSCH 留下 11 个符号。在单天线端口下,其中 3 个符号里 CRS 每 RB 占用 2 个 RE。因此每个 PRB 有 11 x 12 - 6 = 126 个 RE,25 个 PRB 共 3150 个 RE。QPSK 每 RE 承载 2 比特,合计 6300 比特。
CB Segmentation: TBS: 4008, C=1, K+=4032, F=0 36.212 第 5.3.2 节为传输块添加 24 比特的传输块 CRC,因此 B = 4032。第 5.1.2 节仅在块大于 6144 比特时才分割,所以只有一个码块且没有码块 CRC。4032 本身就是一个 turbo 交织器尺寸,因此无需填充比特。
Reading 5760 samples. sf_idx = 0 一个 1 ms 子帧内 5760 个采样点,对应采样率 5.76 MHz。即在 15 kHz 子载波间隔下的 384 点 FFT,足以覆盖 25 个 PRB 的 300 个子载波。

日志行

数字的来源

Creating 4 PHICH mapping units. Normal length, Ng=1.00

36.211 第 6.9 节给出常规 CP 下 PHICH 组数为 ceiling(Ng x NRB/8)。取 Ng = 1、25 个 RB,即 ceiling(3.125) = 4。

PCFICH allocating 4 regs

PCFICH 始终占用 4 个 REG,用于承载其 16 个 QPSK 符号。

Init PDCCH REG space CFI 1. 27 useful REGs (3 CCEs)

由于存在 CRS,符号 0 每 RB 有 2 个 REG,共 50 个 REG。PCFICH 占用 4 个,4 个 PHICH 组占用 12 个,剩余 34 个。一个 CCE 为 9 个 REG,因此可容纳 3 个 CCE,占用 27 个 REG。

Init PDCCH REG space CFI 2. 108 useful REGs (12 CCEs)

在单天线端口下,符号 1 不含 CRS,每 RB 有 3 个 REG,因此增加 75 个 REG。34 + 75 = 109 个 REG 可提供 12 个 CCE,占用 108 个 REG。

Init PDCCH REG space CFI 3. 180 useful REGs (20 CCEs)

符号 2 再增加 75 个 REG。109 + 75 = 184 个 REG 可提供 20 个 CCE,占用 180 个 REG。

Init PDSCH: 1 ports 25 PRBs, max_symbols: 4200

25 PRB x 12 个子载波 x 14 个符号 = 一个子帧内 4200 个 RE。这是在扣除控制区域和 CRS 之前的上限。

RBG Bitmap: 0x1fff, Resource Block Group Size: 2

36.213 表 7.1.6.1-1 规定 11 至 26 个 RB 时 RBG 大小为 P = 2。于是 25 个 RB 构成 13 个 RBG,0x1fff 置位全部 13 个比特,因此 25 个 PRB 全部被分配。

Found DCI nCCE: 8, L: 3, n_bits=27

FDD 下 25 个 RB 的 Format 1 共 27 比特。资源分配占用 1 个头部比特和 13 个位图比特,MCS 占 5 比特,HARQ 进程 3 比特,NDI 1 比特,RV 2 比特,TPC 2 比特。L = 3 表示聚合等级 8,即 2 的 3 次方,因此 PDCCH 使用 CCE 8 至 CCE 15 共 8 个 CCE。这可以容纳在 CFI 3 的 20 个 CCE 之内。

Modulation type: QPSK, Transport block size: 4008

MCS 9 在 36.213 表 7.1.7.1-1 中对应 QPSK 和 ITBS 9。表 7.1.7.2.1-1 给出 ITBS 9、25 个 PRB 时为 4008 比特。

NofSymbols: 3150, NofBitsE: 6300

CFI 3 为 PDSCH 留下 11 个符号。在单天线端口下,其中 3 个符号里 CRS 每 RB 占用 2 个 RE。因此每个 PRB 有 11 x 12 - 6 = 126 个 RE,25 个 PRB 共 3150 个 RE。QPSK 每 RE 承载 2 比特,合计 6300 比特。

CB Segmentation: TBS: 4008, C=1, K+=4032, F=0

36.212 第 5.3.2 节为传输块添加 24 比特的传输块 CRC,因此 B = 4032。第 5.1.2 节仅在块大于 6144 比特时才分割,所以只有一个码块且没有码块 CRC。4032 本身就是一个 turbo 交织器尺寸,因此无需填充比特。

Reading 5760 samples. sf_idx = 0

一个 1 ms 子帧内 5760 个采样点,对应采样率 5.76 MHz。即在 15 kHz 子载波间隔下的 384 点 FFT,足以覆盖 25 个 PRB 的 300 个子载波。

码率可由最后几行推得。Turbo 编码器输入 4032 比特,速率匹配后发送 6300 比特,因此有效码率约为 0.64。对无噪声文件中的 QPSK 而言,这是一个中等码率,UE 日志中的 n_iters=1 也印证了这一点:Turbo 解码器只需一次迭代。

  • 25 个 PRB、单端口和 CFI 3 决定了日志中的大部分数字:REG、CCE 和 RE 的数量都由这三项设置推出。
  • MCS 9 配 25 个 PRB 得到 TBS 4008:该数字直接来自 36.213 表 7.1.7.2.1-1。
  • 此处一个码块就足够:4008 比特加上 24 比特 CRC 仍低于 6144 比特的上限。
  • 有效码率约为 0.64:4032 个编码输入比特最终发送为 6300 比特。
  • 36.211 v19.3.0:E-UTRA 物理信道与调制。第 6.7 节 PCFICH、第 6.8 节 PDCCH、第 6.9 节 PHICH。
  • 36.212 v19.3.0:E-UTRA 复用与信道编码。第 5.1.2 节码块分割、第 5.3.2 节下行共享信道。
  • 36.213 v19.4.0:E-UTRA 物理层过程。表 7.1.6.1-1、表 7.1.7.1-1 和表 7.1.7.2.1-1。
  • 36.321 v19.3.0:E-UTRA 媒体接入控制(MAC)协议规范。第 5.3.1 节下行分配接收。

同族文档