truetime-1.5

所属分类:matlab编程
开发工具:matlab
文件大小:2317KB
下载次数:282
上传日期:2007-11-08 05:42:45
上 传 者wxhyzyq
说明:  matlab中truetime toolbox
(truetime toolbox in matlab)

文件列表:
truetime-1.5 (0, 2007-05-08)
truetime-1.5\docs (0, 2007-05-08)
truetime-1.5\docs\block.ps (40171, 2007-05-08)
truetime-1.5\docs\bom.ps (27338, 2007-05-08)
truetime-1.5\docs\cascade.eps (5516, 2007-05-08)
truetime-1.5\docs\dist.ps (326418, 2007-05-08)
truetime-1.5\docs\docdata.tex (1704, 2007-05-08)
truetime-1.5\docs\error.eps (10911, 2007-05-08)
truetime-1.5\docs\ex2.ps (10759, 2007-05-08)
truetime-1.5\docs\hooks.eps (5615, 2007-05-08)
truetime-1.5\docs\hooks.fig (1558, 2007-05-08)
truetime-1.5\docs\kdialog.eps (181429, 2007-05-08)
truetime-1.5\docs\lib.ps (68229, 2007-05-08)
truetime-1.5\docs\manual.sty (1228, 2007-05-08)
truetime-1.5\docs\motes.ps (95053, 2007-05-08)
truetime-1.5\docs\motes_mdl.ps (109699, 2007-05-08)
truetime-1.5\docs\nwdialog.eps (387167, 2007-05-08)
truetime-1.5\docs\nwdialog.ps (102329, 2007-05-08)
truetime-1.5\docs\rayleigh.eps (17945, 2007-05-08)
truetime-1.5\docs\report.tex (169126, 2007-05-08)
truetime-1.5\docs\servo.ps (166907, 2007-05-08)
truetime-1.5\docs\soccer.ps (155653, 2007-05-08)
truetime-1.5\docs\synch.ps (93712, 2007-05-08)
truetime-1.5\docs\timeline.eps (5285, 2007-05-08)
truetime-1.5\docs\ttgetmsgmask.eps (134589, 2007-05-08)
truetime-1.5\docs\ttsendmsg.ps (87976, 2007-05-08)
truetime-1.5\docs\ttsendmsgmask.eps (296246, 2007-05-08)
truetime-1.5\docs\wnwdialog.eps (327585, 2007-05-08)
truetime-1.5\examples (0, 2007-05-08)
truetime-1.5\examples\AODV (0, 2007-05-08)
truetime-1.5\examples\AODV\AODV.mdl (73994, 2007-05-08)
truetime-1.5\examples\AODV\AODVrcvcode.m (11201, 2007-05-08)
truetime-1.5\examples\AODV\AODVsendcode.m (3803, 2007-05-08)
truetime-1.5\examples\AODV\APPLmovecode5.m (277, 2007-05-08)
truetime-1.5\examples\AODV\APPLmovecode6.m (283, 2007-05-08)
truetime-1.5\examples\AODV\APPLrcvcode.m (349, 2007-05-08)
truetime-1.5\examples\AODV\APPLsendcode.m (447, 2007-05-08)
truetime-1.5\examples\AODV\expcode.m (959, 2007-05-08)
truetime-1.5\examples\AODV\findEntry.m (216, 2007-05-08)
truetime-1.5\examples\AODV\findInCache.m (209, 2007-05-08)
... ...

---------------------------------------------- TrueTime 1.5 Example: Wireless Ad-hoc Routing Using AODV Directory: $DIR/examples/AODV ---------------------------------------------- 1. INTRODUCTION This example describes a TrueTime implementation of the Ad-hoc On-Demand Distance Vector (AODV) routing protocol. See the TrueTime reference manual for a more comprehensive description of the example and for references to AODV documentation. 2. COMPILING THE SIMULATION FILES 2.1 Configuring the TrueTime Environment Before starting Matlab, you must set the environment variable TTKERNEL to point to the directory with the TrueTime kernel files: Unix/Linux: > export TTKERNEL=$DIR/kernel Windows: Control Panel / System / Advanced / Environment Variables Then add the following lines to your MATLAB startup script. This will set up all necessary paths to the TrueTime kernel files. addpath(getenv('TTKERNEL')) init_truetime; 2.2 Compilation As described in the reference manual it is possible to write a TrueTime simulation (i.e. the code functions for the tasks and the initialization commands) either as m-files or as C++ functions. For this example only the m-file approach is provided. Since the TrueTime archive contains pre-compiled files, no compilation is required to run TrueTime in the Matlab version. However, if needed, the files may be re-compiled by issuing the command make_truetime from the command prompt. 3. SIMULATIONS Open the model AODV.mdl to run the simulation. - The simulation example consists of seven nodes. Choose the option Update Diagram in the Edit menu to bring up an animation window of the simulation. This will show the original positions of the seven nodes and their respective signal reach. - Run a simulation. In the simulation scenario, the left-most node (node 1) sends data periodically to node 7 with period 0.5. The initial route that is established is 1 -> 3 -> 5 -> 7. At time t=3, node 5 starts to move which eventually leads to the route breaking. At time t=10, node 6 repairs the route by moving in between node 4 and 7. The printouts in the Matlab command window describe the actions in the AODV layer in more detail. Also study the global variable routing_table. - Open and examine the file initsim.m. This file initializes the global variables used in the simulation, e.g., the routing table and the node positions. By changing the variable verbose from 0 to 1 even more detailed AODV information will be displayed when the simulation is run. - The global variables sent and received show the data that is sent (by node 1) and received (by node 7) in the simulation. Examine the lengths of these vectors to determine how many messages that where lost due to the delay in detecting and propagating the information about the broken link back to the source node. (Answer: The messages sent at times 8.0002, 8.5002, and 9.0002 are lost.) - The hello interval determines how fast the network will respond to broken links (and also the bandwidth overhead). Try changing the AODV parameter HELLO_INTERVAL (both in initsim.m and node_init.m) to decrease the number of lost data messages. In this case only two messages are lost.

近期下载者

相关文件


收藏者