Reputation: 91
I just started working with GNU Radio and have trouble to understand what block type I should use for demodulating data correctly.
I'm trying to realize a pulse position-modulation where each symbol has 4 positions for the pulse (4-VPPM). At the moment I use a interpolation block to generate a preamble sequence followed by the vppm-symbol and a UHD USRP Sink for transmitting the data. On the receiver side I use a second laptop and a UHD USRP Source to get the data in my flow graph. I already wrote a block of type sync_block to detect the preamble and add a tag at the correlation peak.
Now I want to demodulate the data to the original byte that was modulated before but I'm not sure which block type is best for this task: First I thought to use a decimation block as it has a fixed rate for input-to-output. But if the block read i.e. 6000 samples (the length of a vppm symbol) and the tag is in samples 5000 and the pulse is at 5000 + 3000 it is not included in the current 6000 samples.
Question: what block type would be the best to demodulate the vppm symbol correctly? What should I ensure when programming the block (i.e. forecast()-function)?
Upvotes: 1
Views: 563
Reputation: 91
OK it looks like I found the solution for my problem. First I built the complete signal processing from creating the samples, modulate, correlate to find the start and add a tag, demodulate and show the result in a sink in one single flow graph.
To get the process asynchronous I used the delay block. The normalized cross correlation block (block type: sync) adds a tag at the correlation peak if the result is greater than a threshold.
The next block I use is the "Tagged Stream Align" block (unfortunately there is no detailed documentation on wiki.gnuradio.org yet) which takes an unaligned stream of tagged stream items and aligns it to the first item. So when my tag is found it is the first sample of the sample package which will be read by the following demodulation block (block type: decimator) to retrieve the original data and will be displayed in a time sink.
Upvotes: 1