Bug 1067 - Add spectrum-aware channel support to the Wi-Fi model
Add spectrum-aware channel support to the Wi-Fi model
Status: RESOLVED DUPLICATE of bug 2400
Product: ns-3
Classification: Unclassified
Component: wifi
pre-release
All All
: P5 enhancement
Assigned To: Tom Henderson
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-28 06:41 EST by Dean Armstrong
Modified: 2016-05-03 19:29 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Armstrong 2011-02-28 06:41:34 EST
Nicola et al. have done some fantastic work on the spectrum-aware
channel and PHY infrastructure for ns-3. I would like to bring this
functionality into the Wi-Fi model on ns-3-dev.

You can see the changes I am proposing on the head of the repository
at http://code.nsnam.org/deanarm/ns-3-dev-wifi-spectrum. I should
note that in the mix here are also proposed fixes for Bug 1064
(correct Friis propagation loss equation), Bug 1065 (include signal
strength in PCAP trace of transmitted frames), and Bug 1066 (set
Radiotap modulation type flags correctly).

There are only three changes in the cited repository that are relevant
to this bug...

 - in changesets 6815:41a6c48251a9, and 6816:7e53de7fe4ad, I laid the
   foundations for introduction of SpectrumYansWifiPhy by moving
   various common (to this and YansWifiPhy) utility methods from
   YansWifiPhy up to WifiPhy (which'll shortly be their common
   ancestor). Specifically, these methods include the dB to ratio
   conversion routines, and frame/payload/preamble duration
   calculators.

 - in changeset 6818:6b56326402a8 I've then pulled in
   SpectrumYansWifiPhy, WifiSpectrumPhyInterface, SpectrumWifiHelper,
   WifiSpectrumErrorModel, and WifiPhyTag from Nicola's branch at
   http://code.nsnam.org/nbaldo/ns-3-dev-spectrum-modular, and also
   moved the WifiSpectrumValueHelper class into the Wi-Fi module,
   adding a 1 MHz resolution spectrum value.

I'd appreciate comments on the proposed approach.
Comment 1 Hossein Safavi 2012-11-06 12:55:49 EST
During my research, I have come across a series of simulations that I would like to run in ns-3 surrounding Cognitive Radio Networks and Whitespace type devices. As a slightly longer term goal, I intend to port over something like the YansWifi stuff to use the SpectrumChannel model, but as a first step there a few foundational pieces that I decided to implement.

Specifically, I have done some work to implement simple energy detection and carrier sensing. I accomplish this using the following method:

1. I subclass from SpectrumPhy to create SpectrumEnergyDetector
2. I store some a frequency selective filter incorporating a spectral shape using SpectrumValue inside the SpectrumEnergyDetector class
   a. The filter will have some shape to mimic RX properties but could certainly be made flat
   b. It encodes information regarding the center frequency that the energy detector is tuned to
   c. It encodes information regarding the bandwidth of the sensing measurement
3. I create a new class that stores a PSD (SpectrumValue), start time (Time), and end time (Time) called SpectrumSignalEvent
4. I store a collection of SpectrumSignalEvent objects inside SpectrumEnergyDetector  in the form of an std::multiset
5. I define an integration window (Time)
6. Each time StartRx is called, I create an object of type SpectrumSignalEvent
   a. Store the PSD of the arriving signal with the RX filter applied
   b. Store the time the event occurred
   c. Store the end time of the event using start_time + duration
   d. I schedule a SpectrumSignalEvent deletion for end_time + integration window
7. I create a function called MeasureEnergy which does the following:
   a. loop through all SpectrumSignalEvents stored in the multiset
   b. compute overlap of the event with the integration window
   c. compute and add the energy and return the value

I am openly soliciting suggestions/comments/criticism on my approach before I go too deep into it. It is questionable if this is the most efficient method and what kind of performance impact it will have. Obviously the complexity grows with the number of networks present (the number of simultaneous Signal Events) as well as typical increases based on granularity of the SpectrumModel used for the SpectrumChannel.

It is absolutely critical for me to get this piece right as it will be the basis for computing interference power, retuning decisions for the cognitive network, etc...

I welcome ANY suggestions or interesting simulation scenarios that would help me flesh out my approach or correct any errors. I will include some code as I clean it up and check compliance with ns-3 guidelines.
Comment 2 Tom Henderson 2015-07-22 16:21:50 EDT
Updating this issue as of July 2015:  there is an implementation of this wifi model (spectrum wifi) in the repository http://code.nsnam.org/laa/ns-3-dev-laa in the src/wifi directory.  Documentation exists in the src/laa-wifi-coexistence/doc directory.  Later in 2015, we plan to propose to move the pieces implemented in src/wifi to the ns-3-dev main tree.
Comment 3 Tom Henderson 2016-01-04 18:37:57 EST
I'd like to try to finish this for ns-3.25.

testing repository is here:
http://code.nsnam.org/tomh/ns-3-dev-spectrum-wifi

will generate code review once documentation is finished
Comment 4 sebastien.deronne 2016-01-05 14:58:47 EST
Tom, thanks for taking care of this, I will have a look at the code or at the review.
Comment 5 ad lee 2016-04-20 22:55:36 EDT
hi, has this patch been add into  ns3.25 ??
(In reply to sebastien.deronne from comment #4)
> Tom, thanks for taking care of this, I will have a look at the code or at
> the review.
Comment 6 Tom Henderson 2016-04-21 02:45:24 EDT
(In reply to ad lee from comment #5)
> hi, has this patch been add into  ns3.25 ??
> (In reply to sebastien.deronne from comment #4)
> > Tom, thanks for taking care of this, I will have a look at the code or at
> > the review.

No, it did not make it; I hope to post a revised code review soon with the intention of making it into ns-3.26.
Comment 7 Tom Henderson 2016-05-03 19:27:53 EDT
I am closing this since I have posted bug 2400 with the proposed code for merge to ns-3.25, which depends on patches found in 2396-2399.
Comment 8 Tom Henderson 2016-05-03 19:29:31 EDT

*** This bug has been marked as a duplicate of bug 2400 ***