3
$\begingroup$

I am currently studying BPSK demodulation. Most probably my question very basic but i am having difficulties to understand the case of real-time bpsk demodulation. Basically, all the examples (matlab, theory books etc) assume i have the whole signal at the receiver with frequency and phase offset in which they apply frequency and phase offset estimation and later symbol and timing recovery. I find it difficult to realize this scheme in a real-time fashion, in which for example I constantly receive samples from antenna in a buffer.

How can i start to perform bpsk demodulation without isolating the signal since the the timing recovery is performed latter in the examples i have checked?

For sure I am missing something or confusing the concepts. Can you please provide a toy example of such methodology or point me to a usually technique to perform in a real-time implementation.

Kind Regards, J

$\endgroup$
1
$\begingroup$

In the implementation of a real receiver, you have to do what is called "streaming", or handing of samples from one block to the next in real time.

Matlab does not lend itself to working with streaming samples; you need a different tool.

For instance, GnuRadio is designed to work in real time with streaming samples. You can even design your demodulator using a visual tool with drag-and-drop of different modules.

It should also be possible to use Python, by setting up a pipe to read samples from your front-end and processing them in sequence.

If you want to use a DSP, I can recommend this book: http://amzn.com/0387748857 which describes the entire design of a streaming digital communications system using a DSP evaluation board.

$\endgroup$
1
$\begingroup$

I'm very thankful for MBaz' answer, because it means that I don't have to be the guy bringing up GNU Radio every time :)

So,

How can i start to perform bpsk demodulation without isolating the signal since the the timing recovery is performed latter in the examples i have checked?

Conceptually, you'll do demodulation after timing recovery. Look at this BPSK signal

BPSK signal

What's received (blue/red) is never the same, sharp BPSK symbol train that was transmitted (cyan/black). It's always a low-pass filtered version of that (both do to channel properties and the fact that you're legally usually not allowed to do high-rate binary transmissions without pulse shaping – the spectrum would have a lot of Sinc-style sidelobes), hence the "smooth" edges, and always a time-, and thus, phase-shifted version, and hence the complex rotation applied to the signal (ie. you'll have both non-zero Real and Imaginary part although you sent BPSK).

Also, and what's more important with respect to demodulation here: assume the "center" of the TX symbols are on the 0,10,20,30,40... marks on the x-Axis, but you don't do timing recovery, so you sample your receive signal (cyan/black) at 5,15,25,35,45,... .

Obviously, you'll have a hard time recovering the TX signals from that (because the values there aren't 1j*({-1,1}), but something like -0.28+0.2j)!

So, timing recovery first, symbol demapping after.

There's actually systems where both, symbol demapping (demodulation) and timing recovery work hand-in-hand, but in any case, you'll need to hit the center of your symbol before you can demodulate.

As MBaz' already said, GNU Radio has all the tools (by the way, I generated above signal plot using it), and is made for receiving live signals. Give it a try! I'd strongly recommend reading the official tutorials from chapter 1 to 7 (in that order), because they build up to you being able to understand and build your own PSK receivers.

$\endgroup$
1
$\begingroup$

Real-time is a bit of a misnomer. In reality, a digital demodulator usually decodes using segments of data from the "past". It buffers up enough of the signal until it can start to do timing recovery, and then saves enough state from that past data to help with recovery of subsequent data (or windows of data), but again, demodulating using data from/in the past, after the system delays and filter impulse responses transients, and etc.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.