averagetrStrep“Q"reqUeuetr>currenttr(中reqUeuetr为跟踪n2和n3队列产生的文件)然后使用gnuplot工具使用averagetr和current,tr绘制队列随时间变化的曲线3.丢包率数据awk处理脚本graphrostRate,awvk#countthepacketlostrateofcBri=0;vente=S2;fromNode=$3toNode=s4:pitT$7srcAddr=$9dstAddr=$10gNum=$11if(fromNode==1&toNode==2&&event==+itotalNum++timeArr[i=timesrate[i]=float)(dropNum/tif(fid==2&&event==d")dropNum++ENDprintf("#numberofpacketsent:%od,lost:%d"totalNum,dropNum)printf(#lostrateofpackets:%f",dropNum/totalNumfor(j=0;j averagetrStrep“Q"reqUeuetr>currenttr(中reqUeuetr为跟踪n2和n3队列产生的文件)然后使用gnuplot工具使用averagetr和current,tr绘制队列随时间变化的曲线3.丢包率数据awk处理脚本graphrostRate,awvk#countthepacketlostrateofcBri=0;vente=S2;fromNode=$3toNode=s4:pitT$7srcAddr=$9dstAddr=$10gNum=$11if(fromNode==1&toNode==2&&event==+itotalNum++timeArr[i=timesrate[i]=float)(dropNum/tif(fid==2&&event==d")dropNum++ENDprintf("#numberofpacketsent:%od,lost:%d"totalNum,dropNum)printf(#lostrateofpackets:%f",dropNum/totalNumfor(j=0;j
登录
首页 » Others » 网络ns2仿真实验分析(RED、丢包率、端到端延迟、吞吐量)附源码

网络ns2仿真实验分析(RED、丢包率、端到端延迟、吞吐量)附源码

于 2020-12-06 发布
0 321
下载积分: 1 下载次数: 1

代码说明:

网络ns2仿真实验分析(RED、丢包率、端到端延迟、吞吐量)附源码分组的端口号。(10) dst addr:目的地址,格式为 node port,其中node代表分组发送节点的id,pot表示发送分组的端口号。(11) seg num:分组的序列号。(12) okt id:分组的唯标识符。3n2与n3之间的RED队列的半均队列长度与当前队列长度随时间的变化如下图所示:torrent and ave"吧 e PED CueL旧300era已n15000ANA图2平均队列长度与当前队列长度随时问变化的曲线图4运行结果中显示CBR流量总共发包550,丢失16,丢包率为:0.029。丢包率随时间的变化如下图所示:packets of lost rate。045graph自04,03500自020.015图3丢包率随时间变化的关系图5CBR流量的吋延随时间的变化如下图所示:1u彐r10.14心01Q。0图4端到端时延随时间变化的关系图6.节点n2的平均吞吐量随时间的变化如下图所示100T图5节点n2的吞吐量随时间变化的关系头7.结果分析:从RED的图示中,可以看出队列的大小波动变化不是很大,在处理突发的包时冇一定的优势。从丟包率、时延和吞吐量的变化图中,可以看出当丟包率增加时,端到端之问的时延也在增加,而吞吐量则下降,丟包率、时延和吞吐量在表示网络性能的好坏时有一定的关系、相关代码1.络拓扑仿真脚木 simulator:tcl:#Create a simulator objectset ns [new Simulator]#Define different colors for data flows for NAM)Sns color 1 BlueSns color 2#Open the nam trace fileset nt lopen out. nam wSns namtrace-all Snfset nd [open out. tr wISns trace-all Snd#Define a finish procedureproc finish仆}{global ns nf ndSns flush-traceclose Snfclose sndexec nam out. namkit o#Create four nodesset no [Sns node]et n1 [Sns nodelset n2 [Sns nodeset n3 [ns node]#Create links between the nodesSns duplex-link Sn0 Sn2 2Mb 10ms DropTailSns duplex-link Sn1 Sn2 2Mb 10ms DropTailSns duplex- link Sn2 Sn3 1.7Mb 20ms RED#Set queue Size of link (n2-n3 to 100Sns queue-limit Sn2 Sn 3 100#Give node position(for NAm)Sns duplex-link-op SnO Sn2 orient right-downSns duplex-link-op Sn1 Sn2 orient right-upSns duplex-link-op $n2 Sn3 orient right#Monitor the queue for link(n2-n3 .( for NAM)Sns duplex-link-op Sn2 Sn 3 queuePos 0.5#Setup a TCP connectionset tcp new Agent/TCPISns attach-agent Sno Stcpset sink [new Agent/TCPSinkSns attach-agent sn3 SinkSns connect stcp SinkStcp set fid 1#Setup a FTP over TCP connectionset ftp [new Application/FTPlSftp attach-agent StcpSftp set type FTPfsetup a UdP connectionset udp [new Agent/UDP]Sns attach-agent Sn1 udpset null [new Agent/Nul]Sns attach-agent Sn3 SnullSns connect Udp SnullUdp set fid_ 2#Setup a CBr over UDP connectionset cbr [new application/Traffic/ CBRIScbr attach-agent UdpScbr set type CBrScbr set packet size 1000Scbr set rate 1mbScbr set random false#Schedule events for the cbr and ftp agentsSns at0.1 Scbr startSns at 1.0"Sftp start"Sns at 40.0"Sftp stop"Sns at 4.5"Scbr stop"#Detach tcp and sink agentsSns at 50 Sns detach-agent $no stcp; Sns detach-agent sn3 Sink"Sns at 50.0 finish#monitor n2 and n3 queueset redg [[sns link Sn2 Sn3] queueset traceq lopen redQueue tr wSredg trace curgSredg trace aveSredg attach Strace#Run the simulationns rur2.RED的数据处理脚本:SgreparedQueue. tr>averagetrStrep“Q" reqUeuetr> current tr(中 reqUeue tr为跟踪n2和n3队列产生的文件)然后使用 gnuplot工具使用 average tr和 current, tr绘制队列随时间变化的曲线3.丢包率数据awk处理脚本 graph rostRate,awvk#count the packet lost rate of cBri=0;vente=S2;from Node =$3toNode=s4:pitT$7srcAddr=$9dstAddr=$10gNum = $11if (fromNode ==1 & toNode ==2&& event==+i totalNum++timeArr[i=timesrate[i]= float)(drop Num/tif(fid==2&& event==d")dropNum++ENDprintf("#number of packet sent: %od, lost: %d"totalNum, dropNum)printf( #lost rate of packets: %f",dropNum/totalNumfor(j=0; j

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Modbus资源大全 不错
    modbusx详尽中文资料、软件、代码 --------------------------------------------------------------------------------------------------------------------------------- 1.modbus相关文档: 文件名:Modbus协议规范(修改稿).doc文件名:Modbus protocol-c.pdf文件名:MODBUS_Book.doc文件名:Modbus_Cn.doc--------------------------------------------
    2021-05-07下载
    积分:1
  • 索尼 imx274 datesheet
    imx274 datesheet,可以对接Hi3519V101,4K,分享一下SONYIMX274LQC-CAbsolute Maximum RatingsItemSymbolRatingsUnitSupply voltage(Analog)1ADD0.3to+3.3VSupply voltage(Digital 1)-0.5to+2.0Supply voltage(Digital 2)DDD20.5to+3.3VInput voltage(Digital)0.3toV。Dp+0.3VOutput voltage(Digital)-0.3toVD2+0.3Guaranteed operating temperature TOPR-30to+75°CStorage guarantee temperatureTSTG30to+80CPerformance guarantee temperature TsPEC10to+60Recommended Operating ConditionsItemSymbolRatingSupply voltage(Analog)VADD2.8±0.1Supply voltage(Digital 1)1.2±0.1VSupply voltage(Digital 2)1.8±0.1Input voltage(Digital)-0.1 to Vopp2+0.11 VADD: VDDSUB, VoDHCM, VoDHPX, VDDHDA, VDDHCP (2.8V power supplyVDDD1: VDDLCN, VDDLSC1 to 2, VDDLPA, VDDLPL1, VoDLPL2 to 3. VDDLIF (1.2V power supply)VDDD2: VDDMIO, VDDMIF (1.8V power supply)SONYIMX274LQC-CUSE RESTRICTION NOTICEThis USE RESTRIC TION NOTICE (Notice )is for customers who are considering or currently using theimage sensor products("Products")set forth in this specifications book. Sony Corporation Sony")mayat any time, modify this Notice which will be available to you in the latest specifications book for theProducts. You should abide by the latest version of this Notice. If a Sony subsidiary or distributor has itsown use restriction notice on the Products, such a use restriction notice will additionally apply betweerou and the subsidiary or distributor. You should consult a sales representative of the subsidiary ordistributor of sony on such a use restriction notice when you consider using the ProductsUse restrictionsThe Products are intended for incorporation into such general electronic equipment as office productscommunication products, measurement products, and home electronics products in accordance withthe terms and conditions set forth in this specifications book and otherwise notified by sony from timeYou should not use the Products for critical applications which may pose a life-or injury-threateningrisk or are highly likely to cause significant property damage in the event of failure of the products. Youshould consult your sales representative beforehand when you consider using the products for suchcritical applications. In addition, you should not use the products in weapon or military equipmentSony disclaims and does not assume any liability and damages arising out of misuse improper usemodification, use of the Products for the above-mentioned critical applications, weapon and militaryequipment, or any deviation from the requirements set forth in this specifications booklesign for SafetySony is making continuous efforts to further improve the quality and reliability of the products howeverfailure of a certain percentage of the products is inevitable. Therefore, you should take sufficient careto ensure the sate design of your products such as component redundancy, anti-contlagration featuresand features to prevent mIs-operation in order to avoid accidents resulting in injury or death fire orother social damage as a result of such failureExport ControlIf the Products are controlled items under the export control laws or regulations of various countriesapproval may be required for the export of the products under the said laws or regulationsYou should be responsible for compliance with the said laws or regulationsNo License Impliedo The technical information shown in this specifications book is for your reference purposes only. theavailability of this specifications book shall not be construed as giving any indication that sony and itscensors will license any intellectual property rights in such information by any implication or otherwiseSony will not assume responsibility for any problems in connection with your use of such information orfor any infringement of third-party rights due to the same. It is therefore your sole legal and financialresponsibility to resolve any such problems and infringementGoverning lawThis notice shall be governed by and construed in accordance with the laws of Japan, without referenceto principles of conflict of laws or choice of laws. All controversies and disputes arising out of or relatingto this Notice shall be submitted to the exclusive jurisdiction of the Tokyo district Court in Japan as thecourt of first instanceOther Applicable Terms and ConditionsThe terms and conditions in the Sony additional specifications, which will be made available to you whenyou order the Products, shall also be applicable to your use of the Products as well as to thisspecifications book. You should review those terms and conditions when you consider purchasingand/or using the ProductsGeneral-0.0. 8SONYIMX274LQC-CContentsDescription---FeaturesDevice structureOptical Black Array and Readout Scan Direction---Absolute Maximum Ratings2233Recommended Operating Conditions---------------USE RESTRICTION NOTICEContentsOptical CePin Configuration------------------Pin description-------------------------458899hen using csl-2When using Sub-LVDS1210 Equivalent Circuit Diagram15Peripheral Circuit19System OutlineWhen using CSl-2When using Sub-LVDSElectrical Characteristics when using cs1-2--------------------------m---------------------------------21. DC Characteristics(CS1-2)a.8..4Current Consumption and Gain Variable Range(CSl-2Supply Voltage and l/O Voltage(CS1-2)2. AC Characteristics(CS1-222INCK, XCLR(CSl-2)22XHS, XVS(Output)(CSI-2)22IC Communication (CSI-2)23DMCKP/DMCKN, DMO(CSl-2Electrical Characteristics When Using Sub-LVDs-------------------m--------------------------1. DC Characteristics(Sub-LVDs)……Current Consumption and gain Variable Range sub-LVDS24Supply Voltage and l/o Voltage(Sub-LVDSLVDS Output DC Characteristics(Sub-LVDS2. AC Characteristics ( Sub-LVDS).........25INCK, XCLR, XVS(input), XHS (input)(Sub-LVDS25Serial Communication(Sub-LVDS)Sub-LVDS Output(Sub-LVDS)26Spectral Sensitivity Characteristics(CS1-2 and Sub-LVDS27Image Sensor Characteristics(CSl-2 and Sub-LVDS)-281. Zone Definition of Image Sensor Characteristics28mage Sensor Characteristics Measurement Method(CSl-2 and Sub-LVDS)1. Measurement conditions2. Color Coding of this Image Sensor and Readout..293. Definition of Standard Imaging Conditions29Setting Registers Using I"C Communication(When Using CSl-2Description of Setting Registers When Using I C communication31Pin Connection of Serial Communication Operation Specifications When Using I"C CommunicationRegister Communication Timing When Using I-C Communication12C Communication Protocol32Register Write and Read33Single Read from Random Location33Single read from current location; iidaiaii:;aaaa“Sequential Read Starting from Random LocationSequential Read Starting from Current Location34Single Write to Random Location35Sequential Write Starting from Random Location35Register Value Reflection Timing to Output Data(CSl-2)36SONYIMX274LQC-CSetting Registers Using Serial Communication (When Using Sub-LVDS)----------------37Setting Registers Using Serial Communication(Sub-LVDS).37Register Value Reflection Timing to Output Data( Sub-LVDS38Register Map…391. Description of Register2. Register Setting for Each Readout Drive Modeeadout Drive Modes( csl-2 and Sub-LVDS)---------------------551. Readout drive modes552. Relationship between Arithmetic Processing and the Number of Output bits in Each Readout Drive ModeImage Data Output Format When Using CSI-2--------------------------58Frame Format (CSI-2)58Frame Structure(CSl-258Embedded Data Line(CSl-2)59CSl-2 serial Output Setting(CSl-2)MIPI Transmitter(CSl-2)62Detailed Specification of Each Mode(CSl-2)---------------631. Horizontal/ Vertical Operation Period in Each Readout Drive Mode(CSl-22. Frame Rate Adjustment(CSl-23. Image Data Output Format CSl-265Vertical Arbitrary Cropping Function(CSl-2)-69Horizontal Arbitrary Cropping Function(CSl-272Electronic Shutter Timing When Using CSI-2------741. SHR, SVR, SMD Setting When Using CSl-2741-1. SHR, SVR Setting(CSl-2)741-2. Electronic Shutter Drive Mode(Csl-2)752. Integration Time in Each Readout Drive Mode and Mode Changes When Using CSl-2762-1. Integration Time in Each Readout Drive Mode(CSl-2762-2. Operation when Changing the Readout Drive Mode(CSl-2772-3. Low Power Consumption Drive in Integration Time When Using Roll ing Shutter Operation(CSl-2)78Image Data Output Format When Using Sub-LVDS--791. Sync Signals and Data Output Timing(Sub-LVDS)““792. Output Range of LVDS Output Data(Sub-LVDS)Detailed Specification of Each Mode(Sub-LVDS)删mHorizontal/Vertical Operation Period in Each Readout Drive Mode(sub-LVDs)..........2. Frame Rate Adjus咖ment(Sub-LVDS)……3. Image Data Output Format ( Sub-LVDS)Vertical Arbitrary Cropping(Sub-LVDS)Horizontal arbitrary cropping function(Sub-LVDS)----m94Electronic Shutter Timing When Using Sub-LVDS961. SHR, SVR Setting(Sub-LVDS)...962. SVR Operation (Sub-LVDS3. Electronic Shutter Drive Mode( Sub-LVDS)974. Integration Time in Each Readout Drive Mode and mode changes When Using Sub-LVDS984-1. Integration Time in Each Readout Drive Mode(Sub-LVDS984-2. Operation when Changing the Readout Drive Mode(Sub-LVDS994-3. Recommended Global Reset Shutter Operation Sequence(Sub-LVDS)1004-4. Interruptive Mode Change(Sub-LVDS4-5. Low Power Consumption Drive in Exposure Time (Sub-LVDS)…102Power-on/off Sequence when using CSI-2---1031. Power-on Sequence(CS2)……1032. Slew Rate Limitation of Power-on Sequence( CSI-21033. Power-off Sequence(CSl-2104Standby cancel sequence when using csl-2--------------------------105Power-on/off Sequence when using Sub-LVDS1161. Power-on Sequence(Sub-LVDS)1062. Slew Rate Limitation of Power-on Sequence(Sub-LVDS).........1063. Power-off Sequence(Sub-LVDS)107Standby Cancel Sequence(Sub-LVDs)------------108SONYIMX274LQC-CSpot Pixel specifications--109Spot Pixel Zone Definition109Notice on White Pixels SpecificationsMeasurement Method for Spot Pixels1111. Black or white pixels at high light1112. White pixels in the dark.3. Black pixels at signal saturated111Spot Pixel Pattern Specifications----------------m---------------------------------------------------112Stain Specifications---113Stain Zone definition113Stain Measurement method.113Relation between Image height and target Cra-----Marking---------mm---------------115Notes on Handling116Package outline ---118List of Trademark Logos and Definition Statements-------------119SONYIMX274LQC-COptical Center(Top View)Package outline10.70±0.1mmPKG lpinM1A1Optical centerM1010See page TBD Package Outl ine" for detailsOptical CenterPin ConfigurationBottom View)lpin index6666δ画δ尚画○●Bottom viewQ§③¤¤意○○○○○○○○10○o⑦A b CE F GMPin configurationSONYIMX274LQC-CPin DescriptionWhen using CS1-2Pin descriptionState inSymbolOADRemarks(CS|-2Standby modeLeave openA2TEST4ATest(No connectionA3VDDHDa Power a Analog power supply (2.8V)A4VDD SUB PowerAnalog power supply(2.8VA5VDDLSC1PowerD Digital power supply(1.2v)A6VssLSC1GNDDDigital GND(1.2V)A7VDDLPL3 Power D Digital power supply (1.2 V)A8VDDLIFowerDigital power supply(1.2v)Leave openB1TEST5ATest(No connectionB2ssHDA GND A Analog GND (2.8V)B3BIASRESResister connectionB4/BGRCapacitor connectionB5GNDD Digital GND (1B6XCLRReset pulse inputB7VssLPL3GNDDigital GND (1.2VB8 VsSLIF1 GND D Digital GND (1.2V)B9DMO4NDigital MiPl outputLow LevelData lane 4connectionB10DMO4P。DDigital MIPl outputLow LevelData lane 4connectionC1TESt3TestLeave open(No connectionC2XCECannect to 1.8 V power supplyLeave openC3TEST1D(No connectionC4TEST2estLeave open(No connectionC5VDDLPAPowerDDigital power supply(1.2v)C6 VDDLPL2 Power D Digital power supply (1.2V)C7 VssLPL2 GND D Digital GND(1.2V)c9DMO2NDigital MIPl outputLow LevelData lane 2connectionData lane 2C10DMO2PDigital MIPl outputLow LevelconnectionD1XHSDDDDHorizontal sync signal outputIf unused xHsleave openD2SDOlest outputLow Leve/ Leave openNo connectionVertical sync signal outpuf unusedⅩVSDleave openD9DMCKND Digital MIPl outputLow LevelClock laneconnectionD10DMCKPDigital MIPl outputLow levelClock LaneconnectionE1SCLDDDc communication clock inputC communication dataE2SDAOinput/outputSONYIMX274LQC-CPinPin descriptionSymbolADState inRemarksNoCS-2Stand by modeE3VSSLCBGNDDigital GND(1.2 V)E8VssLlF2GNDDigital GND(1.2 V)E9DMO1NE10DMO1POFVDDLSC2 PowerF2VssLSC3 PowerDDDDDDADData lane 1Digital MIPl outputLow LevelconnectionData lane 1Digital MIPI outputLow LevelconnectionDigital power supply (1.2 V)Digital power supply (1.2 v)F3VopHCMPowerAnalog power supply(2.8 V)F8INCKInput clockDMO3NDigital MIPl outputData lane 3Low LevelconnectionF10 DMO3PData lane 3Digital MIPI outputLow LevelconnectionG3VssHCPGNDAAnalog GND (2.8V)G8VssLSC2 GND D Digital GND(1.2V)G9VssMIF2 GNDD Digital GND (1.8VG10VoDMIFPowerDDigital power supply (1.8V)H1VDDLCN GND D Digital GND(1.2V)VsSLCNGNDDigital GND (1.2 VH3VopHCPPowerAnalog power supply(2.8VDLO2P( Pin for Sub-LVDS)Leave open(No connectionH9DLO2M000(Pin for Sub-LVDS)Leave open(No connectiH10DLOOP(Pin for Sub-LVDS)Leave open(No connection)VssHPX3 GND AAnalog GND(2.8 V)J3VoDHPXPowerDLO3PADDDAADDAnalog power supply(2.8 V)(Pin for Sub-LVDS)Leave open(No connectionDLO3MO00(Pin for Sub-LVDS)Leave open(No connection)J10DLOOMD(Pin for Sub-LVDS)eave open(No connection)K2VssLPL 1GNDDDigital GND(1.2V)K3 VDDLPL1 Power D Digital power supply(1.2V)K4VoDMIO Power D Digital power supply(1.8V)K5DLO1M(Pin for Sub-LVDS)Leave open(No connectionDLCKM0b「(Pin for Sub-LVDS)Leave open(No connection)Leave openK7DLCKPD(Pin for Sub-LVDS(No connectionLeave openK8DLO9PD(Pin for Sub-LVDS)(No connectionLeave openK9DLO9M(Pin for Sub-LVDS)(No connectionK10DLO5P(Pin for Sub-LVDS)Leave openNo connection
    2020-12-11下载
    积分:1
  • LDPC码MATLAB
    非常实用的LDPC程序代码~可以参考以更好地学习LDPC~
    2020-12-04下载
    积分:1
  • ZPL语言入门级教(共69页)
    ZPLII语言
    2021-08-01 00:31:06下载
    积分:1
  • 人工鱼群算法matlab代码
    人工鱼群智能算法课程代码,仿生群体智能算法,matlab代码。
    2020-12-05下载
    积分:1
  • 最优潮流内点法
    在matlab上面编写的,基于原对偶内点法的(跟踪中心路径参数内点法)最优潮流,具体编程思想请参见王锡凡《现代电力系统分析》
    2021-05-07下载
    积分:1
  • Android项目GPS实时定位位置共享源码
    Android项目GPS实时定位位置共享源码,完全可用。亲测测试,通过百度地图定位。
    2020-12-11下载
    积分:1
  • 语音信号倒谱的matlab
    我自己编写的求语音信号倒谱的程序,并且将求解结果和matlab工具箱自带的倒谱函数计算结果相对比,两者完全一致。通过这个程序,也可以加强对matlab自带函数的理解
    2020-11-30下载
    积分:1
  • bcmail-jdk15on-1.49.jar/bcpkix-jdk15on-1.49.jar/bcprov-jdk15on-1...
    【实例简介】bcmail-jdk15on-1.49.jar bcpkix-jdk15on-1.49.jar bcprov-jdk15on-1.49.jar 打包下载
    2021-11-28 00:37:34下载
    积分:1
  • 基于FPGA的DDS任意波形发生器
    基于FPGA的双路可移相任意波形发生器,其中包括系统设计原理,正弦波、三角波、锯齿波的波形文件!能实现相位调节及其显示!
    2020-12-02下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载