LTE Module User Documentation(翻译15)——示例程序、参考场景以及故障检测和调试技巧
LTE用户文档
(如有不当的地方,欢迎指正!)
21 Examples Programs(示例程序)
22 Reference scenarios(参考场景)
- [TR36814] 的 A.2 节提到的系统仿真场景。
- dual stripe model [R4-092042], 在示例程序 src/lte/examples/lena-dual-stripe.cc 中有部分提及。该示例程序的特点是有很多可配置的参数,可以通过修改相关的全局变量来自定义。可以使用下列命令来获取所有这些全局变量的列表:
./waf --run lena-dual-stripe --command-template="%s --PrintGlobals"
下面小节给出了运行仿真程序的例子。
22.1 Handover simulation campaign
void
NotifyHandoverEndOkUe (std::string context, uint64_t imsi,
uint16_t cellId, uint16_t rnti)
{
std::cout << "Handover IMSI " << imsi << std::endl;
} int
main (int argc, char *argv[])
{
/*** SNIP ***/ Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/HandoverEndOk",
MakeCallback (&NotifyHandoverEndOkUe)); lteHelper->EnablePhyTraces ();
lteHelper->EnableRlcTraces ();
Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
rlcStats->SetAttribute ("StartTime", TimeValue (Seconds ()));
rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simTime))); Simulator::Run ();
Simulator::Destroy ();
return ;
}
- 将六边形小区划分为3个扇区,每个扇区有 7 个宏基站站点(例如,21个宏小区),站点间的距离为 500 m 。
- 尽管 lena-dual-stripe 最初用于两层网络( macrocell 和 femtocell)仿真,我们简化为只有一层(macrocell)。
- 用户随机部署在站点周围,使用空闲模式小区选择自动连接到网络。此后,用户以 60 kmph 的移动速度在仿真环境中移动。
- 仿真持续时间为 50 秒,因此用户有足够的时间来触发一些切换。
- 宏小区传输功率为 46 dBm ,用户传输功率为 10 dBm。
- 使用 EPC 模式(因为 X2 切换需要)。
- 下行和上行业务为全缓存,5 MHz 带宽,使用 TCP 协议和 Proportional Fair (比例公平)调度器。
- 理想的 RRC 协议。
| Parameter name | Value | Description |
| simTime | 50 | 50 seconds simulation duration |
| nBlocks | 0 | Disabling apartment buildings and femtocells |
| nMacroEnbSites | 7 | Number of macrocell sites (each site has 3 cells) |
| nMacroEnbSitesX | 2 | The macrocell sites will be positioned in a 2-3-2 formation |
| interSiteDistance | 500 | 500 m distance between adjacent macrocell sites |
| macroEnbTxPowerDbm | 46 | 46 dBm Tx power for each macrocell |
| epc | 1 | Enable EPC mode |
| epcDl | 1 | Enable full-buffer DL traffic |
| epcUl | 1 | Enable full-buffer UL traffic |
| useUdp | 0 | Disable UDP traffic and enable TCP instead |
| macroUeDensity | 0.00002 | Determines number of UEs (translates to 48 UEs in our simulation) |
| outdoorUeMinSpeed | 16.6667 | Minimum UE movement speed in m/s (60 kmph) |
| outdoorUeMaxSpeed | 16.6667 | Maximum UE movement speed in m/s (60 kmph) |
| macroEnbBandwidth | 25 | 5 MHz DL and UL bandwidth |
| generateRem | 1 | (Optional) For plotting the Radio Environment Map |
| Default value name | Value | Description |
| ns3::LteHelper::HandoverAlgorithm | ns3::NoOpHandoverAlgorithm,ns3::A3RsrpHandoverAlgorithm, orns3::A2A4RsrqHandoverAlgorithm | Choice of handover algorithm |
| ns3::LteHelper::Scheduler | ns3::PfFfMacScheduler | Proportional Fair scheduler |
| ns3::LteHelper::UseIdealRrc | 1 | Ideal RRC protocol |
| ns3::RadioBearerStatsCalculator::DlRlcOutputFilename | <run>-DlRlcStats.txt | File name for DL RLC trace output |
| ns3::RadioBearerStatsCalculator::UlRlcOutputFilename | <run>-UlRlcStats.txt | File name for UL RLC trace output |
| ns3::PhyStatsCalculator::DlRsrpSinrFilename | <run>-DlRsrpSinrStats.txt | File name for DL PHY RSRP/SINR trace output |
| ns3::PhyStatsCalculator::UlSinrFilename | <run>-UlSinrStats.txt | File name for UL PHY SINR trace output |
$ ./waf --run="lena-dual-stripe
--simTime= --nBlocks= --nMacroEnbSites= --nMacroEnbSitesX=
--epc= --useUdp= --outdoorUeMinSpeed=16.6667 --outdoorUeMaxSpeed=16.6667
--ns3::LteHelper::HandoverAlgorithm=ns3::NoOpHandoverAlgorithm
--ns3::RadioBearerStatsCalculator::DlRlcOutputFilename=no-op-DlRlcStats.txt
--ns3::RadioBearerStatsCalculator::UlRlcOutputFilename=no-op-UlRlcStats.txt
--ns3::PhyStatsCalculator::DlRsrpSinrFilename=no-op-DlRsrpSinrStats.txt
--ns3::PhyStatsCalculator::UlSinrFilename=no-op-UlSinrStats.txt
--RngRun=" > no-op.txt $ ./waf --run="lena-dual-stripe
--simTime= --nBlocks= --nMacroEnbSites= --nMacroEnbSitesX=
--epc= --useUdp= --outdoorUeMinSpeed=16.6667 --outdoorUeMaxSpeed=16.6667
--ns3::LteHelper::HandoverAlgorithm=ns3::A3RsrpHandoverAlgorithm
--ns3::RadioBearerStatsCalculator::DlRlcOutputFilename=a3-rsrp-DlRlcStats.txt
--ns3::RadioBearerStatsCalculator::UlRlcOutputFilename=a3-rsrp-UlRlcStats.txt
--ns3::PhyStatsCalculator::DlRsrpSinrFilename=a3-rsrp-DlRsrpSinrStats.txt
--ns3::PhyStatsCalculator::UlSinrFilename=a3-rsrp-UlSinrStats.txt
--RngRun=" > a3-rsrp.txt $ ./waf --run="lena-dual-stripe
--simTime= --nBlocks= --nMacroEnbSites= --nMacroEnbSitesX=
--epc= --useUdp= --outdoorUeMinSpeed=16.6667 --outdoorUeMaxSpeed=16.6667
--ns3::LteHelper::HandoverAlgorithm=ns3::A2A4RsrqHandoverAlgorithm
--ns3::RadioBearerStatsCalculator::DlRlcOutputFilename=a2-a4-rsrq-DlRlcStats.txt
--ns3::RadioBearerStatsCalculator::UlRlcOutputFilename=a2-a4-rsrq-UlRlcStats.txt
--ns3::PhyStatsCalculator::DlRsrpSinrFilename=a2-a4-rsrq-DlRsrpSinrStats.txt
--ns3::PhyStatsCalculator::UlSinrFilename=a2-a4-rsrq-UlSinrStats.txt
--RngRun=" > a2-a4-rsrq.txt
- 注意,有些参数没有指定,因为它们和默认值一样,我们也保持切换算法为各自的默认设置。
- 注意仿真输出的文件名,例如 RLC traces 和 PHY traces,因为我们必须确保它们不被下一次仿真运行覆盖。在本例中,我们通过使用命令行参数来命名。
- --RngRun=1 参数在最后是用于设置被 random number generator(随机数字产生器)使用的运行次数。 我们使用不同的 RngRun 值再次运行仿真, 因此会创建同一仿真的几个独立副本。然后我们把这些副本所得结果进行平均,实现统计意义上的confidence 。
- 我们可以增加一个参数 --generateRem=1 来生成必要的文件——生成仿真的 REM。 结果如下图 REM obtained from a simulation in handover campaign, 产生的步骤参见前面的章节 Radio Environment Maps 。该图也表明在仿真开始使用RngRun = 1 时基站和用户的位置。其他的 RngRun 值可能产生不同的用户位置。
.png)

% RxBytes is the 10th column
DlRxBytes = load ("no-op-DlRlcStats.txt") (:,);
DlAverageThroughputKbps = sum (DlRxBytes) * / / % RxBytes is the 10th column
UlRxBytes = load ("no-op-UlRlcStats.txt") (:,);
UlAverageThroughputKbps = sum (UlRxBytes) * / / % Sinr is the 6th column
DlSinr = load ("no-op-DlRsrpSinrStats.txt") (:,);
% eliminate NaN values
idx = isnan (DlSinr);
DlSinr (idx) = ;
DlAverageSinrDb = * log10 (mean (DlSinr)) % convert to dB % Sinr is the 5th column
UlSinr = load ("no-op-UlSinrStats.txt") (:,);
% eliminate NaN values
idx = isnan (UlSinr);
UlSinr (idx) = ;
UlAverageSinrDb = * log10 (mean (UlSinr)) % convert to dB
$ grep "Handover" no-op.txt | wc -l
| Statistics | No-op | A2-A4-RSRQ | Strongest cell |
| Average DL system throughput | 6 615 kbps | 20 509 kbps | 19 709 kbps |
| Average UL system throughput | 4 095 kbps | 5 705 kbps | 6 627 kbps |
| Average DL SINR | -0.10 dB | 5.19 dB | 5.24 dB |
| Average UL SINR | 9.54 dB | 81.57 dB | 79.65 dB |
| Number of handovers per UE per second | 0 | 0.05694 | 0.04771 |
22.2 Frequency Reuse examples(频率复用例子)
$ ./waf --run "lena-frequency-reuse --ns3::LteHelper::FfrAlgorithm=ns3::LteFrSoftAlgorithm"
$ ./waf --run "lena-frequency-reuse --ns3::LteHelper::FfrAlgorithm=ns3::LteFrSoftAlgorithm
--generateRem=true --remRbId="
.png)

$ ./waf --run "lena-frequency-reuse --ns3::LteHelper::FfrAlgorithm=ns3::LteFfrSoftAlgorithm
--generateSpectrumTrace=true"

.png)
$ ./waf --run="lena-dual-stripe
--simTime= --nBlocks= --nMacroEnbSites= --nMacroEnbSitesX=
--epc= --useUdp= --outdoorUeMinSpeed=16.6667 --outdoorUeMaxSpeed=16.6667
--ns3::LteHelper::HandoverAlgorithm=ns3::NoOpHandoverAlgorithm
--ns3::LteHelper::FfrAlgorithm=ns3::LteFrHardAlgorithm
--ns3::RadioBearerStatsCalculator::DlRlcOutputFilename=no-op-DlRlcStats.txt
--ns3::RadioBearerStatsCalculator::UlRlcOutputFilename=no-op-UlRlcStats.txt
--ns3::PhyStatsCalculator::DlRsrpSinrFilename=no-op-DlRsrpSinrStats.txt
--ns3::PhyStatsCalculator::UlSinrFilename=no-op-UlSinrStats.txt
--RngRun=" > no-op.txt
$ ./waf --run="lena-dual-stripe
--simTime= --nBlocks= --nMacroEnbSites= --nMacroEnbSitesX=
--epc= --useUdp= --outdoorUeMinSpeed=16.6667 --outdoorUeMaxSpeed=16.6667
--ns3::LteHelper::HandoverAlgorithm=ns3::NoOpHandoverAlgorithm
--ns3::LteHelper::FfrAlgorithm=ns3::LteFrHardAlgorithm
--ns3::RadioBearerStatsCalculator::DlRlcOutputFilename=no-op-DlRlcStats.txt
--ns3::RadioBearerStatsCalculator::UlRlcOutputFilename=no-op-UlRlcStats.txt
--ns3::PhyStatsCalculator::DlRsrpSinrFilename=no-op-DlRsrpSinrStats.txt
--ns3::PhyStatsCalculator::UlSinrFilename=no-op-UlSinrStats.txt
--RngRun= --generateRem=true --remRbId=" > no-op.txt

.png)

.png)

.png)
23 故障检测和调试技巧
- 首先检查控制面,特别是 RRC 连接建立过程,通过使能日志组件 LteUeRrc 和 LteEnbRrc。
- 然后检查数据面的数据包传输,首先使能日志组件 LteUeNetDevice 和 EpcSgwPgwApplication,然后是 EpcEnbApplication,接着向下移动到 LTE 无线协议栈 (PDCP, RLC, MAC, 和 PHY), 直到你找到数据包停止处理/转发的位置(All his until you find where packets stop being processed / forwarded)。
参考文献
LTE Module User Documentation(翻译15)——示例程序、参考场景以及故障检测和调试技巧的更多相关文章
- LTE Module User Documentation(翻译9)——Using the EPC with emulation mode
LTE用户文档 (如有不当的地方,欢迎指正!) 15 Using the EPC with emulation mode(使用仿真方式的 EPC) 在上一节中,我们使用点对点链路连接基站和服务 ...
- LTE Module User Documentation(翻译12)——X2切换(X2-based handover)
LTE用户文档 (如有不当的地方,欢迎指正!) 18 X2-based handover 正如 3GPP 定义的,切换是改变用户服务小区的连接方式的过程.这一过程中涉及的两个基站通常称为源基站和目 ...
- LTE Module User Documentation(翻译7)——无线环境地图(REM)、AMC 模型 和 CQI 计算
LTE用户文档 (如有不当的地方,欢迎指正!) 12 Radio Environment Maps 通过使用类 RadioEnvironmentMapHelper 是可能输出文件 Radio E ...
- LTE Module User Documentation(翻译14)——Uplink Power Control(上行功率控制)
LTE用户文档 (如有不当的地方,欢迎指正!) 20 Uplink Power Control(上行功率控制) 上行功率控制功能默认是开启的.用户可以通过设置布尔属性 ns3::LteUePhy: ...
- LTE Module User Documentation(翻译13)——频率复用算法(Frequency Reuse Algorithms)
LTE用户文档 (如有不当的地方,欢迎指正!) 19 Frequency Reuse Algorithms(频率复用算法) 本节我们将描述如何在 LTE 仿真中使用频率复用(FR)算法.共有两 ...
- LTE Module User Documentation(翻译3)——仿真输出
LTE用户文档 (如有不当的地方,欢迎指正!) 6 仿真输出 ns-3 LTE 模型当前支持输出 PHY, MAC, RLC 和 PDCP 级别的 Key Performance Indicators ...
- LTE Module User Documentation(翻译1)——背景、使用概述、基本的仿真程序和配置LTE模型参数
LTE用户文档 (如有不当的地方,欢迎指正!) 1.背景 假定读者已经熟悉 ns-3 simulator ,能运行一般的仿真程序.如果不是的话,强烈推荐读者参考 [ns3tutorial]. 2. ...
- LTE Module User Documentation(翻译11)——配置用户测量
LTE用户文档 (如有不当的地方,欢迎指正!) 17 Configure UE measurements 仿真中激活的用户测量配置取决于所选的 “consumers”,例如切换算法.用户可能需要添 ...
- LTE Module User Documentation(翻译10)——网络连接(Network Attachment)
LTE用户文档 (如有不当的地方,欢迎指正!) 16 Network Attachment(网络连接) 正如前面章节 Basic simulation program 所述,连接用户到基站时通过调 ...
随机推荐
- ThinkPHP 3.2.3 中设置和使用 Session
Session 的配置 可以在 config.php(可以是应用公用的 config.php 或模块的 config.php)中对 Session 进行配置,例如: config.php <?p ...
- mac下docker使用笔记
安装docker https://docs.docker.com/mac/ 启动docker环境launchpad -> Docker Quickstart Terminal ## ...
- [Virtualization][qemu][kvm][virtio] 使用 QEMU/KVM 模拟网卡多队列
序: 做DPDK例子的时候,发现一些例子需要多队列,而我当前所使用的虚拟机并不是多队列的.关于我当前虚拟机的状态,可以见前文. 所以,我的需求就是,让虚拟机里的网卡,有多队列! 参考: http:// ...
- css3翻牌效果
原理:通过css3属性-webkit-transform: rotate(0deg)与-webkit-transform: rotate(180deg)对2个元素设置正反面 然后通过有过渡(trans ...
- input上传按钮 文字修改办法
解决思路是把input 放在文字的上边,弄成透明的,这样在点文字时,实际是点击了input,这样就实现了文件的上传. 具体代码: <style> #uploadImg{ font-size ...
- Spark+Hadoop+Hive集群上数据操作记录
[rc@vq18ptkh01 ~]$ hadoop fs -ls / drwxr-xr-x+ - jc_rc supergroup 0 2016-11-03 11:46 /dt [rc@vq18ptk ...
- JAVA NIO系列(四) 选择器
前面介绍过Channel.Buffer,后面的文章主要讲解Selector的实践以及实现原理,选择器的概念比起通道.缓冲区要复杂一些,并且选择器是NIO中最重要的一部分内容. 为什么使用Selecto ...
- Control Flow
1.重写折半查找,使得在循环内部只执行一次测试 传统的非递归式的折半查找的例子中,while循环语句内部共执行了两次测试,其实只要一次就足够(代价是将更多的测试在循环外执行).重写该函数,使得在循环内 ...
- csuoj 1507: 超大型LED显示屏
http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1507 1507: 超大型LED显示屏 时间限制: 1 Sec 内存限制: 128 MB 提交: ...
- 什么是JSP?它有哪些特点?
什么是JSP? 它有哪些特点? JSP是服务器端的一种基于java语言的网页技术,它是由一些JSP标记,java程序段以及HTML文件组成的结合体,以java语言作为其内置的脚本语言. 实质上是通 ...