第一范文网 - 专业文章范例文档资料分享平台

杭州电子科技大学通信工程计算机网络的实验报告

来源:用户分享 时间:2025/11/24 12:47:57 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

计算机通信与网络

实验报告

姓 名:徐学 号:班 级:通信五班上课时间:周四 一 得 15081525 3-5

实验名称:Simulation on Performance of Data Link

Control Protocols

一、 实验目的

1. Realizing the principles of Data Link Control Protocols. 2. useing the software called matalab to simulate the 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.

三、 实验程序与结果

Project(1)

a=0:0.1:1000;

U=utilization(a,1); //when length of window is 1 semilogx(a,U,'b'); //using function to depict line hold on

U=utilization(a,7); //when length of window is 7 semilogx(a,U,'k'); hold on

U=utilization(a,127); //when length of window is 127 semilogx(a,U,'m');

title('figure 7.12 slind-wind utilization as a function of a') ylabel('utilization') xlabel('a')

text(0.7,0.5,'\\leftarrow w=1'); //noting arrow to

show what the line is

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 //formula for utilization U=1/(1+2a)

Project(2)

a=0:0.1:1000; p=1/1000;

U=stopandwait(a,p); //using the formula to

calculate the U

semilogx(a,U,'r'); //using function to depict line hold on

U=selective_reject(a,7,p); //using the formula to

calculate the U

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,1277,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,'stopwait\\rightarrow '); text(0.23,0.7,'w=7

Go-back-N

&

\\newline

w=7

selective_reject\\rightarrow w=7');

text(10,0.8,'w=127\\newline Go-back-N \\rightarrow'); text(110,0.7,'\\leftarrow w=127');

function U=stopandwait(a,p)

U=(1-p)./(1+2*a); //U=(1-p)/(1+2a) 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 //U=1-p when w>=2a+1

U=W(1-p)/(2a+1) when w<2a+1

杭州电子科技大学通信工程计算机网络的实验报告.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c1iwf69vmd5036aw5tvxo0daes3y38300x4t_1.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top