网络ns2仿真实验分析(RED、丢包率、端到端延迟、吞吐量)附源码
网络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
- 2020-12-06下载
- 积分:1
RTCM3.3协议全
全新RTCM3.3协议完整版RTCM STANDARD 10403.3DIFFERENTIAL GNSS(GLOBAL NAVIGATION SATELLITE SYSTEMS)SERVICES – VERSION 3DEVELOPED BYRTCM SPECIAL COMMITTEE NO. 104OCTOBER 7, 2016COPYRIGHT©2016 RTCMRadio Technical Commission for Maritime Services1611 N. Kent St., Suite 605Arlington, Virginia 22209-214RTCM Paper 141-2016-SC104-STD000ocRTCMco00c30RTCM 10403. 3, Differential GNSS Global Navigation Satellite Systems)Services- Version 3, October 7, 2016This standard (referred to as version 3 has been developed by rtCm special Committee 104 as a moreefficient alternative to the standards entitled rtcm recommended standards for diffe rentialRecommended Standards for Differential gNss Global Navigation Satellite Systems Service, Version 2.x(Current version is 2. 3, now designated as RTCM 10402. 3. Service providers and vendors represented onthe SC104 Committee wanted a new standard that would be more efficient, easy to use, and more easilyadaptable to new situations. The main complaint was that the version 2. x parity scheme, which useswords with 24 bits of data followed by 6 bits of parity, was wasteful of bandwidth. Another complaint wasthat the parity was not independent from word to word. Still another was that even with so many bitsdevoted to parity the actual integrity of the message was not as high as it should be. Plus, 30-bit wordsare awkward to handle. the new standard version 3 is intended to correct these weaknessesUnlike Version 2. x, this standard does not include tentative messages The messages in Version 3 haveundergone testing for validity and interoperability and are considered to be permanent. amendments tothe standard may change the meaning of reserved bits or provide additional clarifying text, but no changeswill be made in the data fields. Changes will require new messages to be developed. In addition to themessages described in the current standard the committee continues to develop new messages whichare described in separately published amendments and periodically gathered into a new edition of thestandard. RTCM 10403x for dgNSS services is proving useful in supporting highly accurate differentialand kinematic positioning as well as a wide range of navigation applications worldwideNote that Version 3 messages are not compatible with Version 2. x. Since many receivers have beendesigned and programmed for use with Version 2. x messages, rtCm is maintaining both standards0402 3 and 10403, 3 as" standardsVersion 3.0The initial edition consisted primarily of messages designed to support real-time kinematic (RTK)operations. The reason for this emphasis is that rtk operation involves broadcasting a lot of informationand thus benefits the most from an efficient data format. Version 3.0 provided messages that supportGPS and gloNaSs rTK operations including code and carrier phase observables antenna parametersand ancillary system parametersVersion 3. 1(RTCM Standard 10403.1:The next edition, Version 3. 1 (RTCM Standard 10403. 1), incorporated GPS Network Corrections, whichenable a mobile receiver to obtain accurate rtk information valid over a large area. In addition, new GPSand GLoNaSS messages provide orbital parameters to assist in rapid acquisition a Unicode text messageis also provided for the transmission of textual data. Finally a set of messages are reserved for vendorswho want to encapsulate proprietary data in their broadcasts the gps Network Corrections enable amobile receiver to obtain accurate rtk information valid over a large area. the network rtk correctioninformation provided to a rover can be considered as interpolated corrections between the referencestations in the rtk network this interpolation is not perfect and varies with the actual conditions of theatmosphere. A residual interpolation error has to be expected. With sufficient redundancy in the RtKnetwork, the network server process can provide an estimate for residual interpolation errors. Suchquality estimates may be used by the rover to optimize the performance of rtk solutions The values maybe considered by the rover as a priori estimates only with sufficient tracking data available the rovermight be able to judge residual geometric and ionospheric errors itselfVersion 3. 1. Amendment 1:Amendments 1 was an extensive addition that adds rtcm messages containing transformation data andinformation about Coordinate reference Systems. For rtCm data supporting a rtk service, coordinatesare measured within the itrf or a regional realization surve yors and other users of rtk services mustnormally present their results in the coordinates of local datums. Therefore, coordinate transformationsare necessary. by having RTCM messages that contain transformation data and information about theCoordinate reference systems the users of the rtk service can obtain their results in the desired datumwithout any manual operations. the rtk service providers can then ensure that current information forthe computation of the transformations is always used. the convenience of this method will promote theacceptance of rtK servicesVersion 3. 1. amendment 2:Amendment 2 added residual error messages to support the use of Non-Physical or Computed referenceStations in a network rtk environmentVersion 3. 1. amendment 3:Amendment 3 addressed differences in the way gnss receiver manufacturers have implemented carrierphase encoding of some Version 3 messages so that carrier phase observations are in phase for all carrierphases of a specific frequency i e. they correct for quarter cycle phase shifts. others retain the quartercycle offset between the carrier phase observations in the data. this amendment documents the waydifferent manufacturers have handled the phase shift issue and prescribes a uniform approach for futureproducts.∨ersiⅰon3.1, Amendment4:Amendment 4 added sections 3.5.13 on glONASS Network rtK Correction Messages and 3.5. 14 on FKPNetwork Rtk Correction Messages Related revisions were also made elsewhere in the document.Version 3. 1. amendment 5Amendment 5 added section 3. 5. 12 on State Space Representation related revisions are also madeelsewhere in the document, along with some editorial correctionsVersion 3. 2(RTCM Standard 10403.2)Version 3.2 consolidates Version 3. 1 and all five amendments into a new edition, and it adds MultipleSignal Messages (MSM)as well. the Multiple Signal Message (MSm)format generates receiverobservables in the same way for all included satellite systems. the messages include compact and fullmessages for Pseudorange, PhaseRange, Carrier to Noise Ratio (standard and high resolution), andPhaseRangeratea table near the beginning of the standard lists which messages were included in each separate editionand amendment, so it should not be necessary for users to refer to older versions. Multiple signalMessages are a generic format that will be followed for all GNSs systems. version 3 originally consisted ofmessages for GPS and GLONASS, each in their own format Now with the imminent addition of signals forBeiDou, Galileo, and QZSS, as well as new signals provided by modernized GPS and GloNASS satellitesthe need for a consistent generic format became evident. service providers and users are urged to migrateto the MsM messages to make it easier to accommodate new gNss services(See The RTCM Multiple Signal Messages: A New Step in GNSS Data Standardization")Another newmessage is the gloNaSS Bias Information message. This message provides information which is intendedto compensate for the first-order inter-frequency phase range biases introduced by the reference receivercode- phase biasVersion 3.2, Amendment 1:Added Galileo F/NAv Satellite Ephemeris Data(msg. 1045 )and Bds MSM(msgs. 1121-1127)Version 3.2 amendment 2Added qzss ephemeris(msg. 1044 )and QZss MSm (msgs. 1111-1117Version 3. 3(RTCM Standard 10403.3)This new edition adds Satellite-Based Augmentation System Multiple Signal Messages to previouslydopted messages for GPS, GLONASS, Galileo, and QzssA new ephemeris message has been added for BeiDou(BDS)and a new I/NAV ephemeris message hasbeen added for Galileo. The new edition also reserves 100 messages be used exclusively by sc104 fornew message developmentFinally, the new edition makes consolidates previous amendments and makes numerous editorialImprovementsNavstar GPS Service, Version 2. x. Service providers and vendors represented on the scco000c30z1O2co00c30Contentsco00c30
- 2020-06-27下载
- 积分:1