Framework for Modeling, Simulation and Code Generation of Wsn
Essay by skylimits2002 • May 11, 2014 • Essay • 967 Words (4 Pages) • 1,481 Views
Essay Preview: Framework for Modeling, Simulation and Code Generation of Wsn
Framework for modeling, simulation and code generation of WSN
I . Summary:
In the world of Wireless sensor networks, simulation before implementation is extremely vital due to the large size and high number or nodes which makes it impractical and very expensive for realistic analysis and deployment. This paper introduce a framework that helps design engineer to simulate their WSN by creating their node components, building blocks and simulate to automatically generate code for different platform and OS.
II. Introduction:
Available simulation software fall between two categories; one is very platform and operating system specific; and the other are just generic network simulators customized to the channel and radios used in the WSN. However; each has is drawback of its own. The first, application are not exchangeable. There is no implemented way to port one application from one platform to another, also debugging is inefficient and extremely time consuming as the engineering has to resort to LED-based debugging. One way to solve those issues, is the to model the network on a higher level, abstracted model and make configurable using realistic topologies. Then, is this case, and automated code generation , modeling, and simulation for network framework shall be used and it's the focus of this paper.
Example of a framework: In that example in a paper; Tiny OS, and MANTIS are used a target platform. Tiny OS provide a graphical presentation for development and simulation called VIPTOS. It allows the use of other models to be called in to model various parts of the systems. Despite the need of having a profound knowledge and expert background of the Tiny OS. the user can model the application using state flow and not need the expertise and solid backgroud of the application since it graphical independent.
III. Methodology:
Figure 1 Framework for modeling, simulation and code generation of WSN
In the flow chart above, WSN application algorithm is first modeled using the previously mentioned modeling platforms. That could be Simulink, for example, or other state flow blocks. This modeled layer is completely controlled and parameterized by the communication medium block which provides a mechanism for the application developer to define the connectivity between the nodes in sensor network. The programming for this communication medium block is usually implemented C language.
Sensor node contains a parameterized a Stateflow block which implements the algorithm that runs inside each single node. Next, is the Stateflow block which is a library object that nodes contain instance of it.
As mentioned above, atomization of the code generating is essential. This is done from the Stateflow representation of the algorithm. Tools for this approach are Embedded code which is capable of generating ANSI C codes for Simulink and Stateflow blocks. Code adaptation are used by TLS ( Target Language Compiler), this generates platform specific code by modifying sections codes for the target platform. This was made easy by calling embedded functions in TinyOS or MANTIS library if used. This way, developer can generate automated application and compile and execute them for the target platform without any modifications.
IV. Simple Simulation Framework
This WSN has been designed using frame work component such as sensor node, and communication medium. 16 nodes all connected to the communication medium block from a sensor network. It has 2 major components :
Communication Medium Model: This contains the logic, and the modeled connectivity between nodes. It implemented in C based S-function. Input and output packets are the objects of the communication medium block. Incoming packet are processed first, then forwarded to the appropriate nodes.
...
...