wiki:Tutorials/c0WiFi/Tutorial2

Version 3 (modified by Surya Satyavolu, 19 years ago) ( diff )

Orbit > Tutorial > Using Noise Generator

Using Noise Generator in Experiments

For further details on topology formation using noise antennas, please refer to the publication here

The main idea is this:

Along with node definitions in the first part of the experiment script, you also define the antenna to be a part of the experiment

The antennas are located here:

  • Antenna 1: Between node2-1 and node2-2
  • Antenna 2: Between node2-7 and node2-8
  • Antenna 3: Between node7-1 and node7-2
  • Antenna 4: Between node7-7 and node7-8.

Attached is a template script to use the noise generator. Please use tutorial-noise.rb as a baseline

The configurable parameters are

  • channel on which you want to operate: Valid channels are 1..11, 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157 and 161
  • Noise power on these channels: Limits are from -90 dBm to +5 dBm

Here is a template script to use the noise generator

Experiment.name = "tutorial-1a"
Experiment.project = "orbit:tutorial"
Experiment.defProperty('noisePower', -44, 'Noise level injected')
#
# Define nodes used in experiment
#
defNodes('sender', [1,2]) {|node|
  node.image = nil  # assume the right image to be on disk
  node.prototype("test:proto:sender", {
    'destinationHost' => '192.168.1.1',
    'packetSize' => 1024,
    'rate' => 300,
    'protocol' => 'udp'
  })
  node.net.w0.mode = "master"
}

defNodes('receiver', [1,1]) {|node|
  node.image = nil  # assume the right image to be on disk
  node.prototype("test:proto:receiver" , {
    'hostname' => '192.168.1.1',
    'protocol' => 'udp'
  })
  node.net.w0.mode = "managed"
}

allNodes.net.w0 { |w|
  w.type = 'b'
  w.essid = "helloworld"
}

antenna(4,4).signal {|s|
  s.bandwidth = 20
  s.channel = 36
  s.power = prop.noisePower
}
#
# Now, start the application
#
whenAllInstalled() {|node|

  #Then start receiver and sender
  NodeSet['receiver'].startApplications
  wait 30
  NodeSet['sender'].startApplications

  antenna(4,4).signal.on

  # Step noise power from -44 to 0dbm in steps of 4db
  -44.step(0, 4) { |p|

    prop.noisePower = p
     wait 5
   }
  wait 10
  Experiment.done
}                             

Note: See TracWiki for help on using the wiki.