fun_ofdm
1.0
802.11a Physical Layer for USRP
|
The timing_sync block. More...
#include <timing_sync.h>
Public Member Functions | |
timing_sync () | |
Constructor for timing_sync block. More... | |
virtual void | work () |
Signal processing happens here. More... | |
![]() | |
block (std::string block_name) | |
constructor More... | |
![]() | |
block_base (std::string block_name) | |
block_base constructor More... | |
Private Attributes | |
double | m_phase_offset |
The phase rotation from symbol to symbol. More... | |
double | m_phase_acc |
The total phase rotation for the current symbol. More... | |
std::vector< tagged_sample > | m_carryover |
Vector for storing the last 160 samples from the input_buffer and carrying them over to the next call to work() More... | |
Additional Inherited Members | |
![]() | |
std::vector< tagged_sample > | 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 timing_sync block.
Inputs tagged samples from the frame_detector block. Outputs tagged samples to the fft_symbols block.
The timing sync block is in charge of using the two LTS symbols to align the received frame in time. It also uses the two LTS symbols to perform an initial frequency offset estimation and applying the necessary correction.
Definition at line 33 of file timing_sync.h.
fun::timing_sync::timing_sync | ( | ) |
Constructor for timing_sync block.
Definition at line 26 of file timing_sync.cpp.
|
virtual |
Signal processing happens here.
Once this block detects the STS_END flag in the input samples it begins correlating the input with the known LTS_TIME_DOMAIN_CONJ samples to find the two Long Training Sequence symbols. Once the start of the two symbols are found it counts 8 samples backwards from the true start of the first LTS symbol as LTS1. This "tricks" the fft_symbols block into thinking that each symbol begins earlier than it actually does. This is ok because each symbol is prefaced by a cyclic prefix and due to the circular property of the DFT it still works. This also aids in reliability in case the estimate of the beginning of each symbol is slightly off.
This block also uses the two LTS symbols to calculate an intial frequency offset. It then applies the offset correction to all subsequent samples until the next frame is detected and a new estimation is calculated.
Implements fun::block< tagged_sample, tagged_sample >.
Definition at line 51 of file timing_sync.cpp.
References CARRYOVER_LENGTH, fun::block< tagged_sample, tagged_sample >::input_buffer, fun::LTS1, fun::LTS2, LTS_CORR_THRESHOLD, LTS_LENGTH, fun::LTS_TIME_DOMAIN_CONJ, m_carryover, m_phase_acc, m_phase_offset, fun::block< tagged_sample, tagged_sample >::output_buffer, and fun::STS_END.
|
private |
Vector for storing the last 160 samples from the input_buffer and carrying them over to the next call to work()
Definition at line 51 of file timing_sync.h.
Referenced by work().
|
private |
The total phase rotation for the current symbol.
Definition at line 45 of file timing_sync.h.
Referenced by work().
|
private |
The phase rotation from symbol to symbol.
Definition at line 43 of file timing_sync.h.
Referenced by work().