Wednesday, June 5, 2019

Improving Performance of MANET under DSR Protocol

Improving Performance of MANET under DSR ProtocolImproving Performance of MANET under DSR Protocol victimization Swarm Optimization to avoid surplusageCHAPTER 5Implementation and interrogatoryThe implementation phase of any project development is the most important phase as it yields the final solution, which solves the problem at hand. The implementation phase involves actual materialization of the ideas, which ar expressed in the abbreviation document and developed in spirit phase. Implementation of any softw atomic number 18 point of intersection trunk is always preceded by important decisions regarding selection of the platform, the language exercised, etc. These decisions are often influenced by several movers such as the real environment in which the administration work, the speed that is required, the security concerns, otherwise implementation peculiar(prenominal) details etc. Implementation should be perfect matching with the traffic pattern document in order to achieve the necessary final product. For implementation of our carcass we use Nedeucerk Simulator (NS) tool for excuse of the network and computer computer programming languages like Tool instruction Language (TCL) and AWK are employ for coding.5.1 General ImplementationImplementation and simulation under NS-2 consists of 3 stepsSimulation DesignThe first step in simulating a network is to design the simulation. In this step, the users should determine the simulation purposes, network configuration and assumptions, the doing measures, and the type of expect resultsConfiguring and Running SimulationThis step implements the design described in the first step. It consists of two phasesNetwork configuration phase In this phase network destinys (e.g., thickener, mobile sink, base station TCP and UDP) are created and configured according to the simulation design. Also, the events such as selective information transfer are scheduled to start at a certain time.Simulation grade This phase starts the simulation which was configured in the NetworkConfiguration Phase. It maintains the simulation clock and executes events chronologically. An algorithm is a procedure or formula for solving a problem. A computer program loafer be viewed as an elaborate algorithm. In mathematics and computer science, an algorithm usually means a downhearted procedure that solves a recurrent problem. The algorithms utilize in the project to solve the problem.Evaluation of Fitness FunctionThe fitness function F(x) is defined as followsF(x) = PDR/k k*NO + AD + PDWhere, NO = Normalized OverheadAD = Average End to End DelayPD = Number of Packet dropPDR = Packet preservation Ratiok = Proportionality continuous used for the optimization of fitness function. Value of k lies between 0 1 i.e. O5.1.1 Proposed Algorithm1) transmissible Algorithm mistreat 1. Simulate the network using the DSR protocol.Step 2. After the simulation, analyze the Trace file. This gives the turn of event s of different modes for the same source and remnanting pair.Step 3. Choose two paths PI P2 for the same source and destination pair with the equal number of nodes n.Step 4. Calculate the Routing Load (RL) MAC Load (ML),Packet economy Ratio ( PDR), End-to-End Delay (D), and number of bundles dropped, for the selected path.Step 5. ease up fitness function on the path chosen in step 3.Step 6. Apply crossover on the path chosen in step 3 at random site.Step 7. Apply mutation after crossover on the path chosen in step 3 on the randomly chosen site.Step 8. Step 6 gives two unsanded paths P1 P2 with one new node as compared to the old path. Let the new node in path PI be nl and in P2 be n2.Step 9. If n 1 belongs to network topology then apply the fitness function on the respective path otherwise discard the path.Step 10. Do the same for node n2 as in Step 9.Step 11. Consider the path with the highest fitness function value and- Respective path will be the optimal path for the give n source and destination pair. The node replaced from the previous path is the misbehaving node.2) Ant Colony OptimizationStep 1 Calculate the probability of selection of impudently generated path that are obtain by applying genetic algorithm for the given source-destination pair. The path will be selected with the higher probability.Pij=pheromone on the link.ij visibility factor of the link.B k k is a constant used for optimizationand lies between 0 and 1, B are the constant aco optimization constantStep 2 The backward ant accumulates the pheromone and also the evaporation of pheromone take place, now we calculate the updated pheromone after the evaporation,ij= (i,j) accumulated pheromone on the link.FF Fitness Functionk proposnalitynew=*old+Step 3 The path with the higher path preference probability will be considered as the best path and the information transmission can be started along that path.Network Simulator2 (NS2)Network Simulator (Version 2), extensively recognized a s NS2, is basically an event driven simulation tool that has schematic helpful in learning the dynamic environment of communication networks. Simulation of agitated as well as wireless network purposes and protocols for example, routing algorithms, TCP, and UDP can be completed using NS-2. In all-purpose, and then the NS-2 make available for the users by means of a way of identifying such network protocols and simulating their corresponding activities.NS-2 is written in C++, with an OTcl1 viewer as a command and configuration interface. The C++ part, which is fast to run but slower to change, is used for detailed protocol implementation.The OTcl part, on the other hand, which runs much slower but can be changed very fast quickly, is used for simulation configuration.One of the advantages of this split language program onrush is that it allows for fast generation of large scenarios.To simply use the simulator, it is sufficient to know OTcl. On the other hand, one disadvantage is t hat modifying and extending the simulator requires programming and debugging in both languages. NS-2 can simulate the followingTopology Wired WirelessTransport Protocols TCP, UDPRouting Static and dynamic routingApplication FTP, HTTP, Telnet, Traffic generators5.2.1 Basic Architecture of NS2The basic architecture of NS2 is shown in the figure 5.1 below. NS2 provides users with executable command ns which take one input quarrel, the name of a Tcl simulation scripting file. Users are providing for the name of a Tcl simulation script as an input argument of anNS2 executable command that is ns.In the majority suitcases, a simulation trace file is shaped, and is second-hand to plot graph and/or to construct animation. NS-2 consists of two key languages C++ and Object-oriented Tool Command Language (OTcl). While the C++ characterizes the internal apparatus of the simulation fair games, the OTcl delineates up simulation by pull together and configuring the substance as well as preparat ion discrete events. The C++ and the OTcl are linked collectively by means of TclCL. Mapped to a C++ object versatiles in the OTcl sphere of influence are occasionally referred to as switches. Theoretically, a handle for example, n as a Node handle is just a string in the Otcl sphere of influence, and does not surround any functionality. Instead, the functionality for example, receiving a piece of ground is distinct in the mapped C++ object examples are, of class Connector. In the OTcl province, a handle take steps as a frontend which interrelated with consumers and other Otcl objects. After simulation, NS-2 outputs moreover text-based or animation-based simulation consequences.Figure 5.1 Basic Architecture of NS2To interpret these results graphically and interactively, tools such as NAM (Network Animator) and Xgraph are used. To investigate an exacting behavior of the network, clients can extract a relevant subset of text-based data and make over it to a more conceivable presenta tionTcl and OTcl ProgrammingTcl (Tool Command Language) is used by millions of people in the world. It is a language with a very simple sentence structure and it allows a very easy integration with other languages. The characteristics of these languages are as followsIt allows a fast developmentIt provide a graphic interfaceIt is harmonious with many platformsIt is flexible for integrationIt is easy to useIt is freeSome of the basics of Tcl and Otcl programming are listed below.Assigning a value to a variable is done done the set command for example set b 0assigns the value 0 to b.When we want to use the value assigned to a variable, we should use a $ sign before the variable. For example, if we want to assign the value of the variable b, we should write set x $a.A mathematical unconscious process is done using the expression command. For example, if we wish to assign the sum of values of variables a and b, we should write set x expr $a+$b.The sign starts a commented distincti on that is not part of the program, so the Tcl interpreter will not execute this line.Performance Analysis ModuleThis module performs processing of output result set to compute the various performance metrics required to analyze the performance of flow slice based routing. This module includes followingAWK scripts to compute various performance metrics.Plotting graphs for the performance metric to analyze the performance.The Fig 4.11 gives Flow chart for working of performance analysis module, Understanding the trace file format is essential for simulate performance metric computation. Manually interpretation of NS2 trace files for wireless simulation as followsACTIONsrD s sent, r received, D droppedWHENthe time when the military action happenedWHEREthe node where the action happenedLAYERAGT application,RTR routing,LL link layer (ARP is done here),IFQ outgoing packet queue (between link and mac layer),MAC Mac,PHY physicalSEQNOthe sequence number of the packetTYPEThe packe t typecbr CBR data stream packetftp FTP data stream packetDSR DSR routing packet (control packet generated by routing)RTS RTS packet generated by MAC 802.11ARP link layer ARP packetSIZEthe surface of packet at current layer, when packet goes down, size increases, goes up size decreasesa b c da The packet duration in Mac layer headerb The mac address of destinationc The mac address of sourced The mac type of the packet bodyFigure 5.2 Flow chart for working of performance analysis moduleInitialization and Termination of NS2An ns simulation starts with the commandset ns new SimulatorThe first line in the tcl script. This declares a new variable NS using the set command. The encipher new Simulator is the instantiation of the class Simulator using the reserved word new.In order to have output files with data in the simulation (trace files) or files for visualization (nam files) we need to create the files using the open command as followsOpen the Trace fileset tracefile1 open out.tr w$ns trace-all $namfileOpen the NAM trace fileSet namfile open out.nam w$ns namtrace-all $namfileThe above procedures create a data trace file called out.tr and a nam visualization trace file called out.nam. The second lines open the file out.tr to be used for writing, declared with the letter w. The triad line uses a simulator method called trace-all that have name of file as parameter where the traces will go.The termination of the program is done using a finale procedure.Define a finish procedureproc finish global ns tracefile1 namfile$ns flushtraceclose $tracefile1close $namfileexecnamout.namexit 0Plotting with X graphXgraph is a plotting utility that is provided by ns. It allows to create postscript, Tgif files, and others, by clicking on the button Hdcpy. It can be invoked within the tcl command which results in an immediate display after the end of the simulation. The xgraph command expects one or more ASCII files as input containing each x-y data point pair perl li ne. Some of the options in xgraph areTitle use t title.Size geometry xsize z ysize.Title for axis -x xtitle (for the title of the x axis) and y ytitle (for thetitle of the y axis)Color of text and grid with the stick vCommand for the above options would be shown belowXgraph ov.xg in terms of load units for the overhead,Xgraph dl.xg in terms of microsec delay,Xgraph pdr.xg percentage of delivered data for packet deliver ratio.5.3 Network Animator (NAM)When a simulation is finished, NS produces one or more text-based output files that contain detailed simulation data, if specified to do so in the input script.The data can be used for simulation analysis or as an input to a graphical simulation display tool called NAM. NAM has a nice graphical user interface.It can graphically present information such as throughput and number of packet drops at each link NAM is started with the command nam where is the name of a NAM trace file that was generated by NS, or it can execute it directly out of the TCL simulation script for the simulation to visualize. Figure 5.3 A Simple NAM Window5.4 rivulet SetupThe aim of scrutiny stage is to discover defects/errors by scrutiny individual program components. These components may be functions and the objects or modules. During system exam then these components are integrated to form the complete system. At this stage, of testing should focus on establishing that the system meets its functional requirements and does not behave in unexpected ways. running play data are inputs which have been devised to test the system whereas test cases are inputs to test the system and the outputs are predicted from these inputs if the system operates according to its specification the result of this is used to examine the behavior in a cohesive system.The test cases are selected to ensure that the system behavior can be examined in all possible combinations of conditions. Detecting all the different failure modes for software is generally inf easible. software testing is used in association with verification and validationVerification Have built the software right (i.e., does it match the specification)?Validation Have built the right software (i.e., is this what the customer wants)?Testing ProcessTesting is an integral part of software development. Testing process, in a way certifies, whether the product, that is developed, complies with the standards, that it was designed for Testing process involves edifice of test cases, against which, the product has to be tested.In some cases, test cases are done based on the system requirements specified for the product/software, which is to be developed.Testing ObjectivesThese following objectives imply a dramatic change in view port the testing cannot show absence of defects, it can only show that software errors are present.Testing forms process of executing a program with the intent of finding an error.A good test case design is one that has a probability of finding an error yet undiscovered.A successful test will discovers all the bugs and user can undertake steps to rectify them.5.4.1 Test EnvironmentThe software was tested on the following platform.Operating System Ubuntu 11.10Ns-allinone-2.35DSR to find multiple paths using Genetic Algorithm5.4.2 System testinghither the entire software system is tested and the reference document for this process is the requirements document the main goal is to see if the system meets its requirements.Each module and component of project was thoroughly tested to remove bugs through a system testing strategy. Test cases were generated for all possible input sequences and the output was verified for its correctness. Test cases for system testing are mentioned below.Software testing is the process used to help identify the correctness and completeness of developed system. Testing is a process of skilful investigation that is intended to reveal if the system works in a way it is intended to operate. Testing furnishes a comparison that compares the state and behavior of the product against a specification. Software testing also provides an objective and the independent view of the software to allow the business to appreciate and understand the risks of software implementation.5.4.3 Testing ArtifactsSoftware testing development shown with many artifacts and they areTest PlanA test specification is normally known as test jut out and the investigators are well conscious about what test plans determination is implemented and this information is made obtainable to administration and the developers.The manager or the foremost supervisory plan is to put together them more careful when increasing the code or construction additional revolutionizes.Traceability matrixA traceability matrix is counters that draw a analog necessity or propose for the documents to test documents and it is used to substantiate that the results are acceptable.Test caseThe test case in general consists of a unshared identifie r and obligation references from a design specification then the preconditions along with the events a series of steps known as actions to follow the input output and expected result including the actual result.All these phases can be accumulated in a word central processing unit document, with the spreadsheet, and also the database, or other common repository.Test retinueThe good number of frequent phrase for a collected works of test cases is a test suite.The test suite frequently also contains more comprehensive instructions or goals for each collected works of test cases.Test dataNumerous positions of standards or data are used to test the identical functionality of an exacting characteristic.It is also helpful to manufacture this data to the client and with the creation of or a project.Test draw reinThe software apparatus, illustration of information input and output, and arrangements are all referred to cooperatively as a test harness.Testing MethodsThe testing methods descr ibe the approach that is used to test the working of the project.These approaches tests whether the functionality of the project address with the existing requirements. Overall functionality of the project is also tested.Types of test carried out areUnit testing desegregation testingFunction testingUnit testingA unit test is a piece of code that invokes a unit of work and checks one specific end result of that unit of work.If the assumptions on the end result turn out to be wrong, the unit test has failed. In unit testing and black-box testing then the white-box testing are done to check the correctness of the existing functionality.Normal Manual testing has been done to check the correctness of the functionality of the project. Then the barely results of each testing are depicted in the table the test case approach has been chosen out of the testing artifacts.Integration TestingIntegration testing is any type of software testing that seeks to verify the interfaces between the comp onents against a software design.Integration test may be performed all at once the top-down and bottom-up then significant piece first, some time integrating functional subsystems first and then integrating the subsystems in detach phases using any of the basic strategies.Usually larger the project, the more important the integration strategy will be to the project.Functional testingFunctional testing is the generation of test cases from specifications is a valuable and flexible approach to software testing application from very early system specification right through module specification Functional testing deriving test cases from program specifications.Functional said to set of information used in test cases design not to what is tested also known as Specification based testing (from specifications) black-box testing (no view of the code)and the Functional and the specification description of intended program behavior either formal or informal.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.