|
fun_ofdm
1.0
802.11a Physical Layer for USRP
|
The frame_detector block. More...
#include <frame_detector.h>
Public Member Functions | |
| frame_detector () | |
| Constructor for frame_detector block. More... | |
| virtual void | work () |
| Signal processing happens here. More... | |
Public Member Functions inherited from fun::block< std::complex< double >, tagged_sample > | |
| block (std::string block_name) | |
| constructor More... | |
Public Member Functions inherited from fun::block_base | |
| block_base (std::string block_name) | |
| block_base constructor More... | |
Private Attributes | |
| circular_accumulator < std::complex< double > > | m_corr_acc |
| Circular accumulator for calculating correlation. More... | |
| circular_accumulator< double > | m_power_acc |
| Circular accumulator for calculating correlation. More... | |
| int | m_plateau_length |
| Counter for keeping track of STS plateau length. More... | |
| bool | m_plateau_flag |
| Flag for signaling whether we are currently in a plateau or not. More... | |
| std::vector< std::complex < double > > | m_carryover |
| Vector for storing the last 16 samples from the input_buffer and carrying them over to the next call to work() More... | |
Additional Inherited Members | |
Public Attributes inherited from fun::block< std::complex< double >, tagged_sample > | |
| std::vector< std::complex < double > > | input_buffer |
| input_buffer contains new input items to be consumed More... | |
| std::vector< tagged_sample > | output_buffer |
| output_buffer is where the output items of the block should be placed More... | |
The frame_detector block.
Inputs complex doubles from USRP block. Outputs tagged samples to timing sync block.
This block is in charge of detecting the beginning of a frame using the short training sequence in the preamble.
Definition at line 34 of file frame_detector.h.
| fun::frame_detector::frame_detector | ( | ) |
Constructor for frame_detector block.
Definition at line 23 of file frame_detector.cpp.
|
virtual |
Signal processing happens here.
This block uses auto-correlation to detect the short training sequence. This autocorrelation is achieved through a moving window average using the circular accumulators to keep track of the current auto-correlation and input power of the input samples. The normalized auto-correlation is then compared to a threshold to determine if the current samples are part of the STS or not.
Implements fun::block< std::complex< double >, tagged_sample >.
Definition at line 41 of file frame_detector.cpp.
References fun::circular_accumulator< T >::add(), fun::block< std::complex< double >, tagged_sample >::input_buffer, m_carryover, m_corr_acc, m_plateau_flag, m_plateau_length, m_power_acc, fun::NONE, fun::block< std::complex< double >, tagged_sample >::output_buffer, PLATEAU_THRESHOLD, fun::STS_END, STS_LENGTH, STS_PLATEAU_LENGTH, fun::STS_START, and fun::circular_accumulator< T >::sum.
|
private |
Vector for storing the last 16 samples from the input_buffer and carrying them over to the next call to work()
Definition at line 69 of file frame_detector.h.
Referenced by work().
|
private |
Circular accumulator for calculating correlation.
Definition at line 47 of file frame_detector.h.
Referenced by work().
|
private |
Flag for signaling whether we are currently in a plateau or not.
Definition at line 63 of file frame_detector.h.
Referenced by work().
|
private |
Counter for keeping track of STS plateau length.
Definition at line 57 of file frame_detector.h.
Referenced by work().
|
private |
Circular accumulator for calculating correlation.
Definition at line 52 of file frame_detector.h.
Referenced by work().