.

Thursday, April 4, 2019

Improving Performance of MANET under DSR Protocol

Improving Performance of MANET under DSR communications protocolImproving Performance of MANET under DSR Protocol using Swarm Optimization to avoid redundancyCHAPTER 5 carrying into action and interrogationingThe implementation leg of either cast 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 de nonative in the analysis papers and developed in design phase. Implementation of any softwargon is etern individuallyy preceded by important decisions regarding selection of the platform, the speech theatrical roled, etc. These decisions ar often influenced by several factors such as the real environment in which the brass work, the speed that is required, the security c at one timerns, other implementation item details etc. Implementation should be perfect matching with the design document in magnitude to achieve the necessary final produ ct. For implementation of our system we use web Simulator (NS) tool for dis excuse of the vane and programming languages like Tool Command Language (TCL) and AWK argon utilize for coding.5.1 General ImplementationImplementation and simulation under NS-2 consists of 3 whole stepsSimulation DesignThe starting step in simulating a vane is to design the simulation. In this step, the users should determine the simulation purposes, network material body and as snapperptions, the procedure measures, and the type of pass judgment resultsConfiguring and Running SimulationThis step implements the design described in the first step. It consists of two phasesNetwork configuration phase In this phase network components (e.g., lymph invitee, mobile sink, base station TCP and UDP) ar created and con straind according to the simulation design. Also, the events such as data transfer are scheduled to start at a certain time.Simulation Phase This phase starts the simulation which was conf igured in the Network variant Phase. It maintains the simulation clock and runs events chronologically. An algorithmic ruleic rule is a procedure or formula for solving a problem. A com sayer program can be viewed as an elaborate algorithm. In mathematics and computer science, an algorithm usually means a small procedure that solves a recurrent problem. The algorithms used in the disgorge 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 = enumerate of Packet dropPDR = Packet Delivery balancek = Proportionality constant used for the optimization of fitness function. Value of k lies between 0 1 i.e. O5.1.1 Proposed algorithmic program1) transmissible AlgorithmStep 1. Simulate the network using the DSR protocol.Step 2. After the simulation, canvas the Trace bear down. This gives the number of incompatible railss for the same source and reference pair.Step 3. Choose two elbow rooms PI P2 for the same source and destination pair with the equal number of nodes n.Step 4. Calculate the R show uping Load (RL) MAC Load (ML),Packet Delivery Ratio ( PDR), End-to-End Delay (D), and number of shares dropped, for the selected path.Step 5. Apply 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 newfound 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 toss 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 habituated 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 newly 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 drying up of pheromone take place, now we calculate the updated pheromone after the evaporation,ij= (i,j) store 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 data transmission can be started along that path.Network Simulator2 (NS2)Network Simulator (Version 2), extensively recognized as NS2, is basically an event driven simulation tool tha t has established ministrant in learning the dynamic environment of communication networks. Simulation of agitated as well as radio tick 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 forthcoming 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 interpreter as a controller and configuration interface. The C++ while, which is fast to run but laggard 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 approach is that it allows for fast extension of large scenarios.To simply use the simulator, it is sufficient to know OTcl. On the other hand, one injustice is that modifying and ext hold onin g the simulator requires programming and debugging in both languages. NS-2 can simulate the followingTopology Wired Wireless gestate 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 constitute of a Tcl simulation scripting consign. Users are providing for the name of a Tcl simulation script as an input argument of anNS2 executable command that is ns.In the volume suitcases, a simulation observe file is shaped, and is second-hand to plot graph and/or to construct animation. NS-2 consists of two depict languages C++ and Object-oriented Tool Command Language (OTcl). While the C++ characterizes the internal apparatus of the simulation objects, the OTcl tougheneds up simulation by pull together and configuring the substance as well as preparation trenchant e vents. The C++ and the OTcl are linked collectively by means of TclCL. Mapped to a C++ object variables in the OTcl sphere of influence are occasionally referred to as switches. Theoretically, a call for example, n as a Node handle is just a string in the Otcl sphere of influence, and does non surround any functionality. Instead, the functionality for example, receiving a big money is distinct in the mapped C++ object examples are, of categorize 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 to a greater extentover 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 exigent behavior of the network, clients can extract a relevant subset of text-based data and make over it to a much 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 syntax 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 compatible with legion(predicate) platformsIt is flexible for integrationIt is easy to useIt is free rough of the basics of Tcl and Otcl programming are listed below. charge a value to a variable is done through 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 operation 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 line that is not pa rt of the program, so the Tcl interpreter will not execute this line.Performance Analysis ModuleThis mental faculty performs appendageing 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 run for chart for working of performance analysis module, Understanding the pull back file format is essential for modeling performance metric computation. Manually interpretation of NS2 trace files for wireless simulation as followsACTIONsrD s sent, r received, D droppedWHENthe time when the action happenedWHEREthe node where the action happenedLAYERAGT application,RTR routing,LL link layer (ARP is done here),IFQ outgoing packet boat queue (between link and mack layer),MAC Mac,PHY physicalSEQNOthe sequence number of the packetTYPEThe pack et typecbr cosmic microwave background radiation 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 size 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 code 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 Tra ce 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 third 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 finish procedure. ascertain a finish procedureproc finish global ns tracefile1 namfile$ns flushtraceclose $tracefile1close $namfileexecnamout.nam give way 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 clitoris 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 contai ning distributively x-y data point pair perl line. 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 flag vCommand for the above options would be shown belowXgraph ov.xg in footing of load social 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 fil e 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 assay SetupThe aim of streamleting stage is to discover defects/errors by bear witnessinging individual program components. These components may be functions and the objects or modules. During system judgeing then these components are integrated to form the complete system. At this stage, of seeing should focus on establishing that the system meets its functional requirements and does not behave in unexpected ways.Test data are inputs which have been devised to seek 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 sticking system.The test cases are selected to ensure that the system behavior can be examined in all achievable combinations of conditions . Detecting all the different failure modes for software is generally infeasible. Software testing is used in association with verification and validationVerification Have built the software right (i.e., does it match the specification)? constitution 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 building 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 erro r.A good test case design is one that has a probability of finding an error yet undiscovered.A booming test will discovers all the bugs and user can undertake steps to rectify them.5.4.1 Test purlieuThe 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 testingHere 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 realizable 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 technical investigating 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 free-lance 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 know as test plan and the investigators are well conscious about what test plans determination is use 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 parallel necessity or propose for the documents to test documents and it is used to endure that the results are acceptable.Test caseT he test case in general consists of a exclusive identifier and pledge 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 usual repository.Test suiteThe 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 foundation of or a project.Test harnessThe software apparatus, illustration of information input and output, and arrangements are all referred to cooperatively as a te st harness.Testing MethodsThe testing methods describe 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 testingIntegration 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 further 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 stray the interfaces between the components 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 separate phases using any of the basic strategies.Usually larger the project, the more important the integration strategy will be to the project. operational testingFunctional testing is the generation of test cases from specifications is a valuable and flexible approach to software testing application from very earlier 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