gr-ofdm

可紊 提交于 2020-08-10 06:20:49

Build requirements

In order to build the gr-ofdm module you will need to install the following prerequisites

How to build and install

In the gr-ofdm folder do

mkdir build
cd build
cmake ../
make

Installation is optional

make install

for USRP1 devices copy the special FPGA image

usrp/images/std_1rxhb_1txhb.rbf

to the uhd images directory. This is necessary to obtain a flat frequency response.
How to run the apps

Assuming that the module has been compiled but not installed, in the gr-ofdm folder do

cd apps
./run_benchmark_gui.sh

to run the simulation or

./run_app.sh ../python/tx.py -f2.45G

And

./run_app.sh ../python/rx.py -f2.45G --disable-ctf-enhancer --scatterplot

to run the rf transmission. Then to observe everything in th graphical user interface:

./run_app.sh gui/ofdm_tx_gui.py

and

./run_app.sh gui/ofdm_rx_gui.py --tx-hostname=<hostname>

be careful with the frequency offset of you radio frontend. It might be necessary to apply a small manual correction of a few kHz.

Additional features:

Coding

./run_benchmark_gui.sh  --coding  --data-blocks=10

Adaptive OFDM

./run_benchmark_gui.sh --sinr-est --multipath

with USRPs and adaptive OFDM enabled

./run_usrp_tx_gui.sh --rx-hostname=<hostname or ip> -f 2.45G --tx-gain=<gain>
./run_usrp_rx_gui.sh --tx-hostname=<hostname or ip> -f 2.45G --sinr-est

Error

cmake ..error:

GNURADIO_TRELLIS_FOUND = TRUE
Checking for GNU Radio Module: UHD
-- Checking for module 'gnuradio-uhd'
-- Found gnuradio-uhd, version 3.7.13.5
*INCLUDES=/usr/local/include
*LIBS=/usr/local/lib/libgnuradio-uhd.so;/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so
-- Found GNURADIO_UHD: /usr/local/lib/libgnuradio-uhd.so;/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so
GNURADIO_UHD_FOUND = TRUE
-- Found PythonInterp: /usr/bin/python (found version "2.7.12")
-- Found NumPy: version "1.11.0" /usr/lib/python2.7/dist-packages/numpy/core/include
-- Found NumPy: version "1.11.0"
/usr/lib/python2.7/dist-packages/numpy/core/include
CMake Error at cmake/Modules/FindITPP.cmake:46 (MESSAGE):
Could not find ITPP library
Call Stack (most recent call first):
CMakeLists.txt:117 (find_package)














-- Configuring incomplete, errors occurred!
See also "/home/nlj/gr-ofdm/build/CMakeFiles/CMakeOutput.log".

install itpp:
ITPP https://sourceforge.net/projects/itpp/

IT++ Configuration and Installation Instructions
================================================

Assuming that you have already downloaded the latest IT++ sources, untar and
unpack the sources, and enter the unpacked directory. Depending on the
package type you have downloaded, use the following commands:

  % gzip -cd itpp-<VERSION>.tar.gz | tar xf -
  % cd itpp-<VERSION>

  % bzip2 -cd itpp-<VERSION>.tar.bz2 | tar xf -
  % cd itpp-<VERSION>

Since version 4.3.0, the IT++ library uses cmake compilation system for
preparing Makefiles, so the compilation procedure is as follows:

  % mkdir build && cd build
  % cmake ..

The `cmake' command can be invoked with additional switches and options
(see cmake help for a full list of them). The most important are:

  o `-DITPP_SHARED_LIB=off', allows to compile the static version of IT++ library. By default this option is
    set to `on'.
  o `-DBLA_VENDOR=vendor', where vendor can be `ACML', `Intel11' or `ATLAS'. This is helpful in selecting a specific 
    external library (ACML or MKL 11). If these libraries are installed in nonstandard locations, on Linux, set 
    `LD_LIBRARY_PATH' environment variable to the location where the libraries are installed. For Windows `PATH' environment 
    variable should be set, while Mac OS X users should use `DYLD_LIBRARY_PATH'.
  o `-DGTEST_DIR=/path/to/gtest/sources' is used to specify the path to
    Google unit test framework (gtest) sources. Thus the unit tests are compiled and can be
    run separately to check IT++ library.
  o `-DOLD_TESTS=on' is used to activate the compilation of older unit tests (no unit test framework required). By default
    this option is set to `off'. These tests are no longer maintained, so it is recommended to use the tests based on Google
    framework. In order to run these tests use `check_tests.py' script found in extras folder (Python is required).
  o `-DHTML_DOCS=off' allows to disable the generation of HTML documentation. Default option is `on' provided that
    Doxygen is found.
  o `-DCMAKE_BUILD_TYPE=Release' allows to specify the build type: Release (default) or Debug. The library name in Debug
    mode is itpp_debug.*, so that both Release and Debug versions could exist in the installation folder.
  o `-DCMAKE_INSTALL_PREFIX=/install/path' allows to specify the installation path. This is used when installing IT++,
    either from command line, with 'make install', either using the INSTALL project from Visual Studio. Note that the user
    should have write permissions to the installation folder.

External Libraries
------------------

By default, cmake checks for a few external libraries, which
might be used by the IT++ library (cf. IT++ Requirements). The detection
procedure is as follows:

 1. First, the presence of a BLAS library among MKL, ACML, ATLAS and NetLib's
    reference BLAS is checked. If one of the above mentioned can be used,
    HAVE_BLAS is defined.

 2. Next, some LAPACK library is being searched, but only if BLAS is
    available. Full set of LAPACK routines can be found in the MKL, ACML and
    NetLib's reference LAPACK libraries. Besides, ATLAS contains a subset of
    optimised LAPACK routines, which can be used with NetLib's LAPACK library
    (this is described in the ATLAS documentation). If some LAPACK library
    can be found, HAVE_LAPACK is defined.

 3. Finally, a set of separate checks for FFT libraries is executed.
    Currently three different libraries providing FFT/IFFT routines can be
    used: MKL, ACML and FFTW. If at least one of them is found, HAVE_FFT id
    defined. Besides, one of the following: HAVE_FFT_MKL, HAVE_FFT_ACML or
    HAVE_FFTW3 is defined, respectively.

If some external libraries are installed in a non-standard location in your
system, e.g. MKL in `/opt/intel/mkl/9.1', cmake will not
detect them automatically. In such a case, you should use LD_LIBRARY_PATH
environment variable to define additional directories to be
searched for libraries and headers. For instance, to configure IT++ to link to 32-bit version 
of MKL 11.0 external libraries, you should use the following commands:

  % export LD_LIBRARY_PATH=/opt/intel/composer_xe_2013.2.146/mkl/lib/intel64/
  % cmake .. -DBLA_VENDOR=Intel11


Compilation
-----------

Now, it is time for compiling and linking the IT++ library. To do so, please
simply run the following command:

  % make

IT++ should compile without any errors or warnings. If this is not the case,
please report the problem on the IT++ Help forum at SourceForge. Please
include information about your OS, compiler version, external libraries and
their versions, etc.


Testing the Compiled Library
----------------------------

It is recommended that you check if your library has been compiled and linked
properly and works as expected. To do so, you need to specify the path to the
Google C++ Test Framework sources as:

  % cmake .. -DGTEST_DIR=/path/to/gtest
  % make
  % gtests/itpp_gtests

As a result, you should obtain a report with test results.

If not all tests passed please report the problem on the IT++ Help forum.


Installation
------------

Finally, you should install the compiled and linked library, include files
and HTML documentation (optionally) by typing:

  % make install

Depending on the CMAKE_INSTALL_PREFIX settings during configuration, you might need the
root (administrator) access to perform this step.

Eventually, you might invoke the following command

  % make clean

to remove all files created during compilation process. Alternatively you could remove
build folder:
  % cd ..
  % rm -rf build

参考连接

gr-ofdm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!