wiki:Old/NodeHandler/FAQ/ToUseNoiseGenerator

Orbit > NodeHandler > FAQ > Noise Generator Usage

Using Noise Generator in Experiments

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

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
}


                                 

Last modified 18 years ago Last modified on Dec 8, 2006, 9:19:35 PM
Note: See TracWiki for help on using the wiki.