GNU Radio 3.7.1 C++ API
ofdm_chanest_vcvc.h
Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /* 
00003  * Copyright 2013 Free Software Foundation, Inc.
00004  * 
00005  * This file is part of GNU Radio
00006  * 
00007  * GNU Radio is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 3, or (at your option)
00010  * any later version.
00011  * 
00012  * GNU Radio is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU General Public License
00018  * along with GNU Radio; see the file COPYING.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street,
00020  * Boston, MA 02110-1301, USA.
00021  */
00022 
00023 #ifndef INCLUDED_DIGITAL_OFDM_CHANEST_VCVC_H
00024 #define INCLUDED_DIGITAL_OFDM_CHANEST_VCVC_H
00025 
00026 #include <gnuradio/digital/api.h>
00027 #include <gnuradio/block.h>
00028 
00029 namespace gr {
00030   namespace digital {
00031 
00032     /*!
00033      * \brief Estimate channel and coarse frequency offset for OFDM from preambles
00034      * \ingroup ofdm_blk
00035      * \ingroup syncronizers_blk
00036      *
00037      * Input: OFDM symbols (in frequency domain). The first one (or two) symbols are expected
00038      *        to be synchronisation symbols, which are used to estimate the coarse freq offset
00039      *        and the initial equalizer taps (these symbols are removed from the stream).
00040      *        The following \p n_data_symbols are passed through unmodified (the actual equalisation
00041      *        must be done elsewhere).
00042      * Output: The data symbols, without the synchronisation symbols.
00043      *         The first data symbol passed through has two tags:
00044      *         'ofdm_sync_carr_offset' (integer), the coarse frequency offset as number of carriers,
00045      *         and 'ofdm_sync_eq_taps' (complex vector).
00046      *         Any tags attached to the synchronisation symbols are attached to the first data
00047      *         symbol. All other tags are propagated as expected.
00048      *
00049      * Note: The vector on ofdm_sync_eq_taps is already frequency-corrected, whereas the rest is not.
00050      *
00051      * This block assumes the frequency offset is even (i.e. an integer multiple of 2).
00052      *
00053      * [1] Schmidl, T.M. and Cox, D.C., "Robust frequency and timing synchronization for OFDM",
00054      *     Communications, IEEE Transactions on, 1997.
00055      * [2] K.D. Kammeyer, "Nachrichtenuebertragung," Chapter. 16.3.2.
00056      */
00057     class DIGITAL_API ofdm_chanest_vcvc : virtual public block
00058     {
00059      public:
00060       typedef boost::shared_ptr<ofdm_chanest_vcvc> sptr;
00061 
00062       /*!
00063        * \param sync_symbol1 First synchronisation symbol in the frequency domain. Its length must be
00064        *                     the FFT length. For Schmidl & Cox synchronisation, every second sub-carrier
00065        *                     has to be zero.
00066        * \param sync_symbol2 Second synchronisation symbol in the frequency domain. Must be equal to
00067        *                     the FFT length, or zero length if only one synchronisation symbol is used.
00068        *                     Using this symbol is how synchronisation is described in [1]. Leaving this
00069        *                     empty forces us to interpolate the equalizer taps.
00070        *                     If you are using an unusual sub-carrier configuration (e.g. because of OFDMA),
00071        *                     this sync symbol is used to identify the active sub-carriers. If you only
00072        *                     have one synchronisation symbol, set the active sub-carriers to a non-zero
00073        *                     value in here, and also set \p force_one_sync_symbol parameter to true.
00074        * \param n_data_symbols The number of data symbols following each set of synchronisation symbols.
00075        *                       Must be at least 1.
00076        * \param eq_noise_red_len If non-zero, noise reduction for the equalizer taps is done according
00077        *                         to [2]. In this case, it is the channel influence time in number of
00078        *                         samples. A good value is usually the length of the cyclic prefix.
00079        * \param max_carr_offset Limit the number of sub-carriers the frequency offset can maximally be.
00080        *                        Leave this zero to try all possibilities.
00081        * \param force_one_sync_symbol See \p sync_symbol2.
00082        */
00083       static sptr make(
00084           const std::vector<gr_complex> &sync_symbol1,
00085           const std::vector<gr_complex> &sync_symbol2,
00086           int n_data_symbols,
00087           int eq_noise_red_len=0,
00088           int max_carr_offset=-1,
00089           bool force_one_sync_symbol=false
00090       );
00091     };
00092 
00093   } // namespace digital
00094 } // namespace gr
00095 
00096 #endif /* INCLUDED_DIGITAL_OFDM_CHANEST_VCVC_H */
00097