close Warning: Can't synchronize with repository "(default)" (/common/SVN/crkit does not appear to be a Subversion repository.). Look in the Trac log for more information.

Changes between Initial Version and Version 1 of wiser/mSoftware/aWiserd


Ignore:
Timestamp:
Aug 1, 2014, 3:09:16 AM (8 years ago)
Author:
seskar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • wiser/mSoftware/aWiserd

    v1 v1  
     1== wiserd ==
     2
     3[[TOC(Documentation/dSDR/*, depth=2)]]
     4
     5'''wiserd''' was developed as a basic software building block of a distributed frequency-domain based spectrum sensing system consisting of a number of deployed spectrum sensors (SDR nodes) that are managed by the centralized controller. The main goal was to provision the SDR node with a monolithic (i.e. simple to deploy) relatively portable (i.e. with minimal number of software dependencies) application with fft based processing of time-domain RF signals that has ability to control RF and spectrum sensing parameters. Over time, the '''wiserd''' grew up to include other (not necessarily frequency domain and not receiver only) modules. The [http://en.wikipedia.org/wiki/Daemon_%28computing%29 daemon type C++ application] is divided into modules and is multithreaded. The block-diagram of the application is shown in Figure 1. It consist of the following functional modules:
     6
     7[[Image(wiserd.jpg, width=300px, margin=30, align=left)]]
     8
     9 * The '''main module''' (controller) handles user commands which can either be entered locally on a controlling terminal or sent from a remote controller over TCP.
     10 * The '''radio module (uhd)''' handles all the communication to and from the radio device. While the current version of the module was designed to work with VITA standard, it was only thoroughly tested with USRP devices. If another radio device was to be used, this is would be the only module that needs to be tested/changed.
     11 * The '''receiver module (rx)''' uses the radio device to receive IQ time samples at preset frequencies with preset sampling rates and forwards them to the receiver '''consumer modules'''. In addition to interfacing with consumers, the rx module is also used to assign consumer threads to processing cores based on real-time requirements. It can also be used for buffering and re-packetization.
     12 * The '''transmitter module (tx)''' uses the radio device to transmit signals, received from '''transmitter producer modules''' as IQ time samples, at preset frequencies with preset sampling rates.
     13
     14The producer/consumer modules are written following the [http://en.wikipedia.org/wiki/Factory_method_pattern factory method pattern]:
     15 * '''Receiver consumer modules''' receive the IQ time samples from the receiver module and process them. The same set of IQ samples is passed on to all consumers for arbitrary processing. At present, available receiver consumers are: fft_movavg_udp, fft_pow_udp, store_to_file.
     16  * '''Transmitter producer modules''' send the IQ time samples to the transmitter module to be transmitted on the radio device. Present transmitter producers are: signal_from_file, waveform.
     17
     18The '''wiserd''' code was written using [http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml Google style].
     19
     20=== Receiver modules ===
     21
     22  1. '''fft_movavg_udp''': performs the FFT on the time samples received from the receiver module, calculates the moving average and sends the results via UDP. The consumer name used to add the consumer while using the program is "fftmovingavgudp". Needed parameters: FFT length, averaging window length, UDP address and port.
     23  1. '''fft_pow_udp''': performs the FFT on the time samples, calculates the power of each FFT bin and sends the results as arrays of 8bit numbers via UDP, with a preset minimal power corresponding to 0 and preset maximal power corresponding to 255. Consumer name is "fftpowudp". Needed parameters: FFT length, minimal power, maximal power, UDP address and port.
     24  1. '''store_to_file''': simply stores the time samples as complex 32bit floats in a binary file, with the format of the file being: receiver frequency as a 32bit float, receiver sampling rate as a 32bit float, receiver gain as a 32bit float, the number of stored samples as a 32bit unsigned integer, followed by the samples as 32bit complex floats, with the real part coming first and imaginary second for each sample. Consumer name is "storetofile".  Needed parameters: the required number of time samples to store.
     25  1. '''fft_movavg_oml''': performs the FFT on the time samples received from the receiver module, calculates the moving average and sends the results to the OML server. The consumer name is "fftmovingavgoml". Needed parameters: FFT length, averaging window length, OML server address and port (use server name "FILE" to store locally), OML filename.
     26  1. '''fft_sigpower_oml''': performs the FFT on the time samples receivd from the receiver module, calculates the peak power in dBm and 3dB bandwidth each second, and on used command sends the results to the OML server. Needed parameters: FFT length, OML server address and port (use server name "FILE" to store locally), OML filename.
     27
     28=== Transmitter modules ===
     29
     30  1. '''signal_from_file''': reads IQ time samples stored as complex floats from a file and sends them to the transmitting module. Producer name is "signalfromfile". Needed parameters: file name.
     31  1. '''waveform''': has a number of predefined waveforms to be sent to the transmitting module. Consumer name is "waveform". Needed parameters: waveform type, waveform frequency (depending on the type).
     32
     33=== Usage ===
     34
     35The commands may be entered in the command line or sent via TCP. The default port is 5123. The list of commands with their syntax:
     36
     37==== get ====
     38'''get''' command is used to obtain values of parameters of certain modules. The user must use the correct module (uhd, rx and tx) when trying to access a parameter. For example, the receiver frequency, called rx_freq, is a parameter of the radio module (uhd), since it is set using the radio device driver. On the other hand, FFT length or the moving average window or anything the receiver consumers might need is a part of the receiver module (rx). For example, the command to get the current value of the receiver frequency is:
     39{{{
     40get uhd rx_freq
     41}}}
     42
     43==== set ====
     44'''set''' command is used to set values of the parameters. It's similar to "get", with the addition of the value at the end. Example:
     45{{{
     46set uhd rx_freq 3.432e9
     47}}}
     48
     49==== add ====
     50'''"add"''' command is used to add a consumer to the transmitting or receiving module. Examples:
     51{{{
     52add rx fftmovingavgudp
     53add tx waveform
     54}}}
     55
     56==== delete ====
     57'''"delete"''' command deletes (stops) an added producer/consumer from the transmitting or receiving module. Examples:
     58{{{
     59delete rx fftpowudp
     60}}}
     61
     62==== scan ====
     63"scan" is a procedure that reads a script from a file, and then follows it to perform scanning of the spectrum by repeatedly adding the store_to_file consumer, and then deleting it when the work is done, for different values of receiving parameters. It has a single parameter: the file name from which the script is loaded. The input file is a textual file. The first line contains a single number N, the number of times the store_to_file will be run, followed by N lines containing 4 parameters each: central receiver frequency, receiver sampling rate, receiver gain and the required number of samples to be stored.
     64
     65=== Module Parameters ===
     66
     67  || Receiver module ('''rx''') ||
     68  || numbins          || FFT length ||
     69  || avgwinlen        || Averaging window length ||
     70  || measurement_uri  || UDP address used to send the measurement results to ||
     71  || measurement_port || UDP port used to send the measurement results to ||
     72  || minimal_power    || Lower bound of measured power ||
     73  || maximal_power    || Upper bound of measured power ||
     74
     75  || Transmitter module ('''tx''') ||
     76  || wavetype         || Type of transmitted waveform (SINE, CONST) ||
     77  || wavefreq         || Frequency of the transmitted waveform ||
     78  || amplitude        || Amplitude of the transmitted waveform ||
     79  || wavefilename     || Input file name ||
     80
     81  || Radio module ('''uhd''') ||
     82  || rx_freq          || Receiver central frequency ||
     83  || rx_rate          || Receiver sampling rate ||
     84  || rx_bandwidth     || Receiver bandwidth ||
     85  || rx_gain          || Receiver gain ||
     86  || rx_antenna       || Receiver antenna ||
     87  || tx_freq          || Transmitter central frequency ||
     88  || tx_rate          || Transmitter sampling rate ||
     89  || tx_bandwidth     || Transmitter bandwidth ||
     90  || tx_gain          || Transmitter gain ||
     91  || tx_antenna       || Transmitter antenna ||
     92  || sub_device       || USRP radio internal subdevice to be used ||
     93  || clock_ref        || USRP radio clock reference ||
     94
     95=== Development ===
     96
     97The latest version of the '''wiserd''' code is available in the [source:wiserd git repository]. To check out the latest code:
     98{{{
     99git clone username@packages.orbit-lab.org:/common/git/wiserd
     100}}}
     101The '''wiserd''' daemon is built and installed in /usr/sbin with:
     102{{{
     103make
     104make install
     105}}}