CupCarbon® User Guide Version U-One 3.3 www.cupcarbon.com contact@cupcarbon.com

CupCarbon® User Guide Version U-One 3.3 www.cupcarbon.com contact@cupcarbon.com Document version 2.2 1 Introduction CupCarbon is a Smart City and Internet of Things Wireless Sensor Network (SCI-WSN) simulator. Its objective is to design, visualize, debug and validate distributed algorithms for monitoring, environmental data collection, etc., and to create environmental scenarios such as fires, gas, mobiles, and generally within educational and scientific projects. Not only it can help to visually explain the basic concepts of sensor networks and how they work; it may also support scientists to test their wireless topologies, protocols, etc. CupCarbon offers two simulation environments. The first simulation environment enables the design of mobility scenarios and the generation of natural events such as fires and gas as well as the simulation of mobiles such as vehicles and flying objects (e.g. UAVs, insects, etc.). The second simulation environment represents a discrete event simulation of wireless sensor networks which takes into account the scenario designed on the basis of the first environment. Networks can be designed and prototyped by an ergonomic and easy to use interface using the OpenStreetMap (OSM) framework to deploy sensors directly on the map. It includes a script called SenScript, which allows to program and to configure each sensor node individually. From this script, it is also possible to generate codes for hardware platforms such as Arduino/XBee. This part is not fully implemented in CupCarbon, it allows to generate codes for simple networks and algorithms. CupCarbon simulation is based on the application layer of the nodes. This makes it a real complement to existing simulators. It does not simulate all protocol layers due to the complex nature of urban networks which need to incorporate other complex and resource consuming information such as buildings, roads, mobility, signals, etc. CupCarbon offers the possibility to simulate algorithms and scenarios in several steps. For example, there could be a step for determining the nodes of interest, followed by a step related to the nature of the communication between these nodes to perform a given task such as the detection of an event, and finally, a step describing the nature of the routing to the base station in case that an event is detected. The current version of CupCarbon allows to configure the nodes dynamically in order to be able to split nodes into separate networks or to join different networks, a task which is based on the network addresses and the channel. The energy consumption can be calculated and displayed as a function of the simulated time. This allows to clarify the structure, feasibility and realistic implementation of a network before its real deployment. The propagation visibility and the interference models are integrated and includes the ZigBee, LoRa and WiFi protocols. CupCarbon represents the main kernel of the ANR project PERSEPTEUR that aims to develop algorithms for an accurate simulation of the propagation and interference of signals in a 3D urban environment. What’s new? 1. Intelligent mobility which can be based on the sensed information, 2. New ergonomic and professional design and graphical user interface based on the new framework JavaFX. Any action can be cancelled and reconsidered (Undo/Redo), 3. Studied and fine drawing quality with pleasant visual objects for an easy use of the environment. Many options are added to the user in order to choose the preferred visual (dark, light, marking nodes and edges, modifying dynamically the simulation parameters, …) and to obtain the best and clean visualization of the network and the working environment, 4. Very easy script language based on the SenScript, which includes intuitive commands, 5. Possibility to take into account the topology of a city (buildings) as well as the radio propagation and visibility in this environment, 6. Possibility to include in the simulation the interferences of signals at PHY layer for the Acknowledgment messages. The interferences use very accurate models based on the alpha- stable distribution, 2 7. Possibility to consider many radio modules and standards (802.15.4, WiFi and LoRa) in the same sensor node. Radio modules can be changed either in the environment or during simulation (in the Script), 8. Possibility to consider the clock drift. 9. Arduino Code generation for basic networks. This Document This document is composed of 5 parts: 1. Presentation of the environment CupCarbon: this environment is composed mainly on the graphical user interface and the map, 2. Presentation of the objects of CupCarbon: this section presents all the objects that can be added on the map of CupCarbon and how to manipulate and configure them, 3. Presentation of SenScript: the script used to program the sensor nodes. All the commands are presented with some examples to facilitate their use, 4. Presentation of 17 basic examples: these examples allow to familiarize with the CupCarbon environment and its objects in order to understand how it works and how to design complex objects, 5. Presentation of 4 advanced examples: this section presents some complex projects in order to give an idea on how to use CupCarbon. Acknowledgment and contact We want to thank all the participants of this project CupCarbon that is a part of the research project PERSEPTEUR supported by the French research agency ANR (Agence Nationale de la Recherche) under the reference ANR-14-CE24-0017-01. The partners of this project are: • Virtualys company (http://www.virtualys.fr) • IEMN and IRCICA research institutes (http://www.iemn.fr and http://www.ircica.univ-lille1.fr) • Xlim laboratory (http://www.xlim.fr) • Lab-STICC laboratory (http://lab-sticc.fr/en/index) To contact us please, use the one of the following emails: • contact@cupcarbon.fr • cupcarbon@univ-brest.fr This work is part of the research project PERSEPTEUR supported by the French Agence Nationale de la Recherche ANR. Copyright © 2017 - CupCarbon Table of content Introduction ............................................................................... 1 What’s new? ............................................................................. 1 This Document .......................................................................... 2 Acknowledgment and contact ................................................... 2 Table of content ........................................................................ 0 CupCarbon Environment .......................................................... 6 The Map .................................................................................... 6 The Menu bar ............................................................................ 9 Project menu ............................................................................. 9 Edition menu ............................................................................. 9 Add menu ................................................................................ 10 Display menu .......................................................................... 12 Selection menu ....................................................................... 16 Solver menu ............................................................................ 16 Simulation menu ..................................................................... 17 Map menu ............................................................................... 19 Personal menu ........................................................................ 19 Help menu ............................................................................... 19 The Toolbar ............................................................................. 20 Project part .............................................................................. 20 Add object part ........................................................................ 20 Connections part ..................................................................... 20 Simulation part ........................................................................ 20 Magnetism part ....................................................................... 21 Selection part .......................................................................... 21 Action state part ...................................................................... 21 The parameter menu .............................................................. 22 1 Devices & Objects [Device List] [Selection] ............................ 22 Device Parameters ................................................................. 22 Radio Parameters ................................................................... 23 Marker Parameters ................................................................. 24 Simulation Parameters and SenScript Window ...................... 25 The state bar ........................................................................... 27 CupCarbon Objects ................................................................ 28 Sensor Node ........................................................................... 28 Media Sensor Node ................................................................ 30 Base Station (Sink) ................................................................. 30 Gas (Analog events) ............................................................... 30 Mobile ..................................................................................... 31 Marker ..................................................................................... 31 Add randomly sensor nodes ................................................... 31 Add sensor nodes ................................................................... 31 Generating routes ................................................................... 32 Adding buildings ...................................................................... 33 Drawing buildings .................................................................... 33 Network keyboard and mouse events ..................................... 33 Keyboard events ..................................................................... 33 Mouse events .......................................................................... 33 SenScript ................................................................................ 34 Example: ................................................................................. 34 List of Commands ................................................................... 34 and (logic) ............................................................................... 34 angle / angle2 ......................................................................... 34 areadsensor (Analog Read Sensor) ....................................... 34 atch ......................................................................................... 34 atid .......................................................................................... 35 atpl .......................................................................................... 35 atmy ........................................................................................ 35 2 atnd ......................................................................................... 35 atnid ........................................................................................ 35 atget ........................................................................................ 35 band ........................................................................................ 35 battery ..................................................................................... 35 bnot ......................................................................................... 35 bor ........................................................................................... 35 buffer ....................................................................................... 35 bxor ......................................................................................... 35 cbuffer ..................................................................................... 35 conc ........................................................................................ 36 cprint ....................................................................................... 36 data ......................................................................................... 36 dec .......................................................................................... 36 delay ....................................................................................... 36 distance ................................................................................... 36 div ........................................................................................... 36 dreadsensor ............................................................................ 36 drssi ........................................................................................ 36 egde ........................................................................................ 36 for end ..................................................................................... 36 function ................................................................................... 37 getinfo ..................................................................................... 37 getpos ..................................................................................... 37 getpos2 ................................................................................... 37 goto ......................................................................................... 37 hash ........................................................................................ 37 if [else] end .............................................................................. 37 inc ........................................................................................... 38 int ............................................................................................ 38 kill ............................................................................................ 38 3 led ........................................................................................... 38 loop ......................................................................................... 38 mark ........................................................................................ 38 math ........................................................................................ 38 max ......................................................................................... 38 min .......................................................................................... 38 minus ...................................................................................... 38 mod ......................................................................................... 38 move ....................................................................................... 39 mult ......................................................................................... 39 not (logic) ................................................................................ 39 nth ........................................................................................... 39 or (logic) .................................................................................. 39 pick .......................................................................................... 39 plus ......................................................................................... 39 printfile .................................................................................... 39 print ......................................................................................... 39 radio ........................................................................................ 39 rand ......................................................................................... 40 randb ....................................................................................... 40 rdata ........................................................................................ 40 read ......................................................................................... 40 receive .................................................................................... 40 rgauss ..................................................................................... 40 rmove ...................................................................................... 40 rotate ....................................................................................... 40 route ........................................................................................ 40 rscript ...................................................................................... 40 sadd ........................................................................................ 40 script ....................................................................................... 40 send ........................................................................................ 41 4 set ........................................................................................... 41 simulation ................................................................................ 41 smin ........................................................................................ 41 smax ....................................................................................... 41 spop ........................................................................................ 41 stop ......................................................................................... 41 tab ........................................................................................... 41 tget .......................................................................................... 42 time ......................................................................................... 42 tset .......................................................................................... 42 vdata ....................................................................................... 42 vec .......................................................................................... 42 vget / vset ................................................................................ 42 wait .......................................................................................... 42 while end ................................................................................. 42 xor (logic) ................................................................................ 42 Basic examples ....................................................................... 43 Example 1: Hello World .......................................................... 43 Example 2: Calculate a+b ....................................................... 46 Example 3: Calculate the sum of a vector .............................. 46 Example 4: Marking nodes ..................................................... 47 Example 5: Marking randomly (game of light) ........................ 47 Example 6: Blinking and LEDs ................................................ 48 Blinking ................................................................................... 48 LEDs ....................................................................................... 48 Example 7: Sending and Receiving messages ....................... 49 Example 8: Routing messages ............................................... 51 Example 9: uploads/s1/ cupcarbon-user-guide.pdf

  • 36
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Attribution requise
Partager
  • Détails
  • Publié le Mar 20, 2022
  • Catégorie Administration
  • Langue French
  • Taille du fichier 17.8884MB