12081220+金雨鑫+实验2
更新时间:2023-10-02 07:27:01 阅读量: 综合文库 文档下载
- 12081222推荐度:
- 相关推荐
杭 州 电 子 科 技 大 学
实 验 报 告
学生姓名:金雨鑫 学 号:12081220 指导教师:吴端坡 实验地点:1教108 一、实验室名称:
二、实验项目名称:2.data link layer simulation 三、实验学时:3 四、实验内容:
1.Draw Figure7.12 and 7.13.
2.Simulation on Performance of Data Link Control Protocols
Using the same assumptions that are used for Figure 7.13 in Appendix 7A, plot line utilization as a function of P, the probability that a single frame is in error for the following error-control techniques: a. Stop-and-wait b. Go-back-N with w=7 c. Go-back-N with w=127 d. Selective reject with w=7 e. Selective reject with w=127
Do all of the preceding for the following values of a: 0.1, 1, 10, 100. Draw conclusions about which technique is appropriate for various ranges of a.
实验时间:周二晚上
七、实验器材(设备、元器件):
PC机一台,装有matlab。
八、实验步骤:
(1)a=0:0.1:1000;
U=utilization(a,1); semilogx(a,U); hold on
U=utilization(a,7); semilogx(a,U); hold on
U=utilization(a,127); semilogx(a,U);
title('Figure 7.12 Sliding-Window Utilization as a Function of a') ylabel('Utilization') xlabel('a')
text(0.7,0.5,' \\leftarrow W=1'); text(8,0.6,' \\leftarrow W=7'); text(130,0.8,' \\leftarrow W=127'); 自编函数代码:
function U=utilization(a,W)
U=1.*(W>=2*a+1)+W./(2*a+1).*(W<2*a+1); end
(2)
a=0:0.1:1000; P=1/1000;
U=stopandwait(a,P); semilogx(a,U,'r'); hold on
U=selective_reject(a,7,P); semilogx(a,U,'g'); hold on
U=gobackn(a,7,P); semilogx(a,U,'b'); hold on
U=selective_reject(a,127,P); semilogx(a,U,'k'); hold on
U=gobackn(a,127,P); semilogx(a,U,'y');
title('Figure 7.13 ARQ Utilization as a Function of a (P = 10-3)') ylabel('Utilization') xlabel('a')
text(0.2,0.2,' Stop-and-wait \\rightarrow');
text(0.23,0.7,' W=7 Go-back-N & \\newline W=7 Selective-reject \\rightarrow');
text(10,0.8,' W=127 \\newline Go-back-N \\rightarrow '); text(110,0.7,' \\leftarrow W=127 \\newline Selective-reject'); 自编函数代码:
function U=stopandwait(a,P) U=(1-P)./(1+2*a); End
function U=selective_reject(a,W,P)
U=(1-P).*(W>=2*a+1)+W.*(1-P)./(2.*a+1).*(W<2*a+1); end
function U=gobackn(a,W,P)
U=(1-P)./(1+2.*a.*P).*(W>=2*a+1)+W.*(1-P)./(2.*a+1)./(1-P+W.*P).*(W<2*a+1); end
(3) figure
set (gcf,'Position',[300,0,800,800], 'color','w') a=[0.1, 1, 10, 100]; for i = 1:4 subplot(2,2,i) lab2_draw(a(i))
title(strcat('a=',num2str(a(i)))) end
自编函数代码:
function lab2_draw(a) P=0:0.1:1000; U=stopandwait(a,P); semilogx(P,U,'r'); hold on
U=selective_reject(a,7,P); semilogx(P,U,'g'); hold on
U=gobackn(a,7,P); semilogx(P,U,'b'); hold on
U=selective_reject(a,127,P); semilogx(P,U,'k'); hold on
U=gobackn(a,127,P); semilogx(P,U,'y'); ylabel('Utilization') xlabel('P')
legend('Stop-and-wait','Go-back-N with w=7 ','Go-back-N with w=127 ','Selective reject with w=7 ','Selective reject with w=127 ',3) end
九、实验数据及结果分析:
。a=0.1时,W=7或者127都是大于2a+1;
a=1时,W=7或者127都是大于2a+1;
a=10时,则选择拒绝和返回N都是一个分段函数。
a=100时,则选择拒绝和返回N都是一个分段函数。
正在阅读:
12081220+金雨鑫+实验210-02
Enterprise Architect学习笔记 - 图文01-03
角位移传感器原理 带你了解角位移传感器基本原理 - 图文12-29
土建资料全03-11
后现代家具设计分析06-03
工商管理专业专科毕业论文工作计划09-16
森林动物选美大赛作文800字06-19
Word操作题04-10
烟草物流师岗位技能标准03-30
(初稿)近期网格化平台建设工作方案206-24
- 多层物业服务方案
- (审判实务)习惯法与少数民族地区民间纠纷解决问题(孙 潋)
- 人教版新课标六年级下册语文全册教案
- 词语打卡
- photoshop实习报告
- 钢结构设计原理综合测试2
- 2014年期末练习题
- 高中数学中的逆向思维解题方法探讨
- 名师原创 全国通用2014-2015学年高二寒假作业 政治(一)Word版
- 北航《建筑结构检测鉴定与加固》在线作业三
- XX县卫生监督所工程建设项目可行性研究报告
- 小学四年级观察作文经典评语
- 浅谈110KV变电站电气一次设计-程泉焱(1)
- 安全员考试题库
- 国家电网公司变电运维管理规定(试行)
- 义务教育课程标准稿征求意见提纲
- 教学秘书面试技巧
- 钢结构工程施工组织设计
- 水利工程概论论文
- 09届九年级数学第四次模拟试卷
- 12081220
- 实验
- 金雨鑫
- 四年级学年期末试卷模拟卷B
- 团队干部风采大赛主持词
- CFD 在大型垃圾焚烧炉优化设计中的应用(1023) - 图文
- 小学生参加社会实践后的总结
- 2014广州番禺区初一下册数学期末试卷
- 2015-2020年中国煤油市场深度研究与市场竞争态势报告
- 中考课内外文言文对比阅读试题
- 大集备病句改错复习资料
- 辅导员技能大赛-案例分析报告汇总情况
- 《中国现代文学三十年》参考教案
- 盐业体制改革历经十多年终出台
- 礼貌用语培训
- 华为交换机破解密码方法
- 2000年全国硕士研究生入学统一考试英语试题和解析
- 日本参天制药FXneo眼药水中文版使用说明
- 重大版第七版小学信息技术四年级下册教参
- 把素质教育渗透生物教学
- 语文教学法本科课程大纲
- 中国减压鞋垫行业市场前景分析预测年度报告(目录) - 图文
- 《工作分析》2012考试试题