Discussion:
[Discuss-gnuradio] matched filter for BPSK produced by phase shifting
Laur Joost
2016-04-16 16:30:29 UTC
Permalink
Hi all!

I need a clue where to start.

I have a signal that is BPSK that is modulated not by applying the filtered
baseband to the in-phase component, but instead doing literal analog phase
shifting.

The result is that the signal transitions between the -1 and 1 symbols not
through zero, but instead along the unit circle.

The transmitted baseband is RRC-filtered.

My questions:
1. Is Raised Cosine even a valid Nyquist filter for such a signal? After
all, the actual In-phase transition occurs not according to the RRC
response, but according to the sine OF the RRC.

2. The response of such a modulator to a unit impulse is necessarily
complex. From what I gather, the matched filter is then, also complex (time
reversed and conjugated). How should I go about this in GnuRadio, given
that the PFB Clock sync only takes real taps?

3. Or can I just take the real part of the matched filter and feed that to
PFB Clock sync? The constellation will have a weird spread (see picture).
Will that affect either Costas or PFB?

PS: The positioning of the constellation plots was not planned.

All the best,
Laur
Marcus Müller
2016-04-16 17:00:23 UTC
Permalink
Hi Laur,
Post by Laur Joost
Hi all!
I need a clue where to start.
I have a signal that is BPSK that is modulated not by applying the
filtered baseband to the in-phase component, but instead doing literal
analog phase shifting.
The result is that the signal transitions between the -1 and 1 symbols
not through zero, but instead along the unit circle.
Well, that's a good thing, envelope-wise :)
Post by Laur Joost
The transmitted baseband is RRC-filtered.
Wait, so you got

BPSK symbols (-1,+1,+1,-1...) --> RRC --> analog phase shifter?

Or how do I have to read that?
That would sound like you had two pulse shapers!

Cheers,
Marcus
Post by Laur Joost
1. Is Raised Cosine even a valid Nyquist filter for such a signal?
After all, the actual In-phase transition occurs not according to the
RRC response, but according to the sine OF the RRC.
2. The response of such a modulator to a unit impulse is necessarily
complex. From what I gather, the matched filter is then, also complex
(time reversed and conjugated). How should I go about this in
GnuRadio, given that the PFB Clock sync only takes real taps?
3. Or can I just take the real part of the matched filter and feed
that to PFB Clock sync? The constellation will have a weird spread
(see picture). Will that affect either Costas or PFB?
PS: The positioning of the constellation plots was not planned.
All the best,
Laur
_______________________________________________
Discuss-gnuradio mailing list
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Laur Joost
2016-04-16 19:37:55 UTC
Permalink
Thanks for the response, Marcus!

Analog phase modulator, is more correct I guess.

The RRC filtered signal goes into a signal generator's external modulation
input, and I'm receiving the signal from the generator with USRP.

So: PRBS source (random devboard) -> RRC and DC offset (some IC) -> Phase
modulation +- pi/2 (R&S SMHU signal gen) ->
-> USRP N210 -> GnuRadio -> PBKAC

is the current signal chain.

About the envelope:

Isn't "Special Case of QAM, not PM" what is usually understood as BPSK
nowadays, when pulse shaping is applied? I've been looking for a relevant
citation in textbooks, haven't found one...

Laur
Post by Marcus Müller
Hi Laur,
Hi all!
I need a clue where to start.
I have a signal that is BPSK that is modulated not by applying the
filtered baseband to the in-phase component, but instead doing literal
analog phase shifting.
The result is that the signal transitions between the -1 and 1 symbols not
through zero, but instead along the unit circle.
Well, that's a good thing, envelope-wise :)
The transmitted baseband is RRC-filtered.
Wait, so you got
BPSK symbols (-1,+1,+1,-1...) --> RRC --> analog phase shifter?
Or how do I have to read that?
That would sound like you had two pulse shapers!
Cheers,
Marcus
1. Is Raised Cosine even a valid Nyquist filter for such a signal? After
all, the actual In-phase transition occurs not according to the RRC
response, but according to the sine OF the RRC.
2. The response of such a modulator to a unit impulse is necessarily
complex. From what I gather, the matched filter is then, also complex (time
reversed and conjugated). How should I go about this in GnuRadio, given
that the PFB Clock sync only takes real taps?
3. Or can I just take the real part of the matched filter and feed that to
PFB Clock sync? The constellation will have a weird spread (see picture).
Will that affect either Costas or PFB?
PS: The positioning of the constellation plots was not planned.
All the best,
Laur
_______________________________________________
_______________________________________________
Discuss-gnuradio mailing list
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Andy Walls
2016-04-16 20:18:04 UTC
Permalink
Forgot to add the list

---------- Forwarded message ----------
From: Andy Walls
Date: Sat, Apr 16, 2016 at 4:16 PM
Subject: Re: [Discuss-gnuradio] matched filter for BPSK produced by phase
shifting
To: ***@gmail.com


*From*: Laur Joost *Subject*: [Discuss-gnuradio] matched filter for BPSK
produced by phase shifting *Date*: Sat, 16 Apr 2016 19:30:29 +0300
------------------------------
Post by Laur Joost
Hi all!
Hi.
Post by Laur Joost
I need a clue where to start.
I have a signal that is BPSK that is modulated not by applying the filtered
baseband to the in-phase component, but instead doing literal analog
phase
Post by Laur Joost
shifting.
Please provide a mathematical expression for the above. The description is
too
ambiguous. Something like:

m_filt(t) = RRC_filter(m(t))
s(t) = sin(w_c *t + pi*m_filt(t))
Post by Laur Joost
The result is that the signal transitions between the -1 and 1 symbols
not
Post by Laur Joost
through zero, but instead along the unit circle.
Constant modulus, continuous phase - that's nice to work with.
A PLL or a Costas loop should lock and track well.
AGC can be simple.
Post by Laur Joost
The transmitted baseband is RRC-filtered.
Again, a picture, or sequence of mathematical statements describing the
modulation would be helpful.
Post by Laur Joost
1. Is Raised Cosine even a valid Nyquist filter for such a signal? After
all, the
Post by Laur Joost
actual In-phase transition occurs not according to the RRC response, but
according to the sine OF the RRC.
Well, the Nyquist filter criteria can't be rigorously evaluated without an
expression
to work with. But it really doesn't matter.

If the transmitter used RRC, the matched filter in the receiver must be the
corresponding RRC filter. If it is not Nyquist, you'll get ISI; if it is
Nyquist, you
won't get ISI. You'll have to accept and work with the ISI you get.

Also, the receiver should be performing the matched filtering in a
demodulation
stage that corresponds to where the filter pulses were in the transmitter.
Post by Laur Joost
2. The response of such a modulator to a unit impulse is necessarily
complex.

I don't think that follows. Real pulses being input to real functions,
yields real
outputs.
Post by Laur Joost
From what I gather, the matched filter is then, also complex (time
reversed and
Post by Laur Joost
conjugated).
Complex filters are usually only needed when you need filter that is not
symmetrical about DC (your channel center, aka your baseband). If you
really
are at baseband (which you should be if performing clock recovery),
your pulse filter should not be complex, it will be real. Thus its
conjugate will be
real.
Post by Laur Joost
How should I go about this in GnuRadio, given that the PFB Clock
sync only takes real taps?
Do a separate matched filter with an FFT or FIR filter block, and follow
that with
an M&M clock sync block.

With a separate matched filter block, you unfortunately cannot use the
PFB clock sync block. It works with a peaked matched pulse filter and
that filter's derivative, so passing in a trivial filter like
[1,1,1,1,1,1,...,1] will cause the PFB clock sync block to crash.
Post by Laur Joost
3. Or can I just take the real part of the matched filter and feed that
to PFB
Post by Laur Joost
Clock sync? The constellation will have a weird spread (see picture).
Will
Post by Laur Joost
that affect either Costas or PFB?
Again, I don't think a complex baseband pulse filter makes sense.

BTW, on a slightly related note, taking only the real part of a _signal_
before
obtaining proper phase offset and bit timing is not a good idea.
You will degrade your SNR.



Depending on the the mathematical expression the modulator is
actually implementing, you may have to do something a little
different than the textbook GNURadio BPSK demodulation steps.
Post by Laur Joost
PS: The positioning of the constellation plots was not planned.
All the best,
Laur
Regards,
Andy
Laur Joost
2016-04-16 22:36:11 UTC
Permalink
The phase modulation is according to the equation

S(t) = A*cos(2*pi*f*t + s(t)*pi/2),
s(t) = RRC(2*b(t) - 1)

where
S - modulated carrier
A - Amplitude of the modulated carrier
f - carrier frequency
s - modulating signal (shaped pulses)
b - bit value at time t

But I guess that's moot, given the next:

If the transmitter used RRC, the matched filter in the receiver must be the
Post by Andy Walls
corresponding RRC filter. If it is not Nyquist, you'll get ISI; if it is
Nyquist, you
won't get ISI. You'll have to accept and work with the ISI you get.
Also, the receiver should be performing the matched filtering in a
demodulation
stage that corresponds to where the filter pulses were in the transmitter.
I guess the problem becomes one of matching the stages. How do I get a
continuous (non-mod(2pi)) phase in GnuRadio?
I hacked something together, but it has problems when noise causes a
more-than-pi/2 error, in which case it's suddenly
amplified to a -3pi/2 error. Though I guess a low-pass filter should limit
that happening.

Is there a better way to do this?

​

I don't think that follows. Real pulses being input to real functions,
Post by Andy Walls
yields real
outputs.
Complex filters are usually only needed when you need filter that is not
symmetrical about DC (your channel center, aka your baseband). If you
really
are at baseband (which you should be if performing clock recovery),
your pulse filter should not be complex, it will be real. Thus its
conjugate will be
real.
Thank you! That helped me understand something in another flowgraph.

Laur
Post by Andy Walls
Forgot to add the list
---------- Forwarded message ----------
From: Andy Walls
Date: Sat, Apr 16, 2016 at 4:16 PM
Subject: Re: [Discuss-gnuradio] matched filter for BPSK produced by phase
shifting
*From*: Laur Joost *Subject*: [Discuss-gnuradio] matched filter for BPSK
produced by phase shifting *Date*: Sat, 16 Apr 2016 19:30:29 +0300
------------------------------
Post by Laur Joost
Hi all!
Hi.
Post by Laur Joost
I need a clue where to start.
I have a signal that is BPSK that is modulated not by applying the
filtered
Post by Laur Joost
baseband to the in-phase component, but instead doing literal analog
phase
Post by Laur Joost
shifting.
Please provide a mathematical expression for the above. The description
is too
m_filt(t) = RRC_filter(m(t))
s(t) = sin(w_c *t + pi*m_filt(t))
Post by Laur Joost
The result is that the signal transitions between the -1 and 1 symbols
not
Post by Laur Joost
through zero, but instead along the unit circle.
Constant modulus, continuous phase - that's nice to work with.
A PLL or a Costas loop should lock and track well.
AGC can be simple.
Post by Laur Joost
The transmitted baseband is RRC-filtered.
Again, a picture, or sequence of mathematical statements describing the
modulation would be helpful.
Post by Laur Joost
1. Is Raised Cosine even a valid Nyquist filter for such a signal? After
all, the
Post by Laur Joost
actual In-phase transition occurs not according to the RRC response, but
according to the sine OF the RRC.
Well, the Nyquist filter criteria can't be rigorously evaluated without an
expression
to work with. But it really doesn't matter.
If the transmitter used RRC, the matched filter in the receiver must be the
corresponding RRC filter. If it is not Nyquist, you'll get ISI; if it is
Nyquist, you
won't get ISI. You'll have to accept and work with the ISI you get.
Also, the receiver should be performing the matched filtering in a
demodulation
stage that corresponds to where the filter pulses were in the transmitter.
Post by Laur Joost
2. The response of such a modulator to a unit impulse is necessarily
complex.
I don't think that follows. Real pulses being input to real functions,
yields real
outputs.
Post by Laur Joost
From what I gather, the matched filter is then, also complex (time
reversed and
Post by Laur Joost
conjugated).
Complex filters are usually only needed when you need filter that is not
symmetrical about DC (your channel center, aka your baseband). If you
really
are at baseband (which you should be if performing clock recovery),
your pulse filter should not be complex, it will be real. Thus its
conjugate will be
real.
Post by Laur Joost
How should I go about this in GnuRadio, given that the PFB Clock
sync only takes real taps?
Do a separate matched filter with an FFT or FIR filter block, and follow
that with
an M&M clock sync block.
With a separate matched filter block, you unfortunately cannot use the
PFB clock sync block. It works with a peaked matched pulse filter and
that filter's derivative, so passing in a trivial filter like
[1,1,1,1,1,1,...,1] will cause the PFB clock sync block to crash.
Post by Laur Joost
3. Or can I just take the real part of the matched filter and feed that
to PFB
Post by Laur Joost
Clock sync? The constellation will have a weird spread (see picture).
Will
Post by Laur Joost
that affect either Costas or PFB?
Again, I don't think a complex baseband pulse filter makes sense.
BTW, on a slightly related note, taking only the real part of a _signal_
before
obtaining proper phase offset and bit timing is not a good idea.
You will degrade your SNR.
Depending on the the mathematical expression the modulator is
actually implementing, you may have to do something a little
different than the textbook GNURadio BPSK demodulation steps.
Post by Laur Joost
PS: The positioning of the constellation plots was not planned.
All the best,
Laur
Regards,
Andy
Andy Walls
2016-04-17 00:53:14 UTC
Permalink
Post by Laur Joost
The phase modulation is according to the equation
S(t) = A*cos(2*pi*f*t + s(t)*pi/2),
s(t) = RRC(2*b(t) - 1)
where
S - modulated carrier
A - Amplitude of the modulated carrier
f - carrier frequency
s - modulating signal (shaped pulses)
b - bit value at time t
I'm more at home with FSK, but, yeah, putting the RRC filter there doesn't
seem to be the norm for PSK.
(For FSK modulations, the pulse filter is applied to the pulses that make
up the phase term.)
Post by Laur Joost
If the transmitter used RRC, the matched filter in the receiver must be the
Post by Andy Walls
corresponding RRC filter. If it is not Nyquist, you'll get ISI; if it is
Nyquist, you
won't get ISI. You'll have to accept and work with the ISI you get.
Also, the receiver should be performing the matched filtering in a
demodulation
stage that corresponds to where the filter pulses were in the transmitter.
I guess the problem becomes one of matching the stages. How do I get a
continuous (non-mod(2pi)) phase in GnuRadio?
Since integral(d(phi)/dt) = phi, maybe something like this:

-> quad_demod -> iir_filter( b=[1], a=[1 -1], oldstyletaps=False) ->

But you see the problem with that integrator, right. Just like infinite
phase unwinding, that integrator can blow up.
Post by Laur Joost
I hacked something together, but it has problems when noise causes a
more-than-pi/2 error, in which case it's suddenly
amplified to a -3pi/2 error. Though I guess a low-pass filter should limit
that happening.
The RRC filter is a low-pass filter; maybe it will be enough.
Post by Laur Joost
Is there a better way to do this?
My comments:
a. I haven't though about the costas loop position and function.
b. The rotator block does a z-plane rotation (aka, discrete freq spectrum
translation with aliases/wrap-around), and not an I/Q plane phase
rotation. Is a frequency translation by Fs/2 really what you want? If you
want a phase rotation, just use a multiply const block with a complex
exponential (cmath.exp(1j*phi), IIRC).
c. Your RRC taps would go in the decimating FIR filter.
d. The complex to arg block will be outputting your symbols as +/- pi/2, if
all goes well. The M&M block wants peaks nominally at +/- 1.0. Scale your
RRC filter gain accordingly.
e. Replace the blocks after the M&M block with a binary_slicer block, to
convert your soft bits to hard bits. The M&M block can output a 0, in
which case the divide block will have problems.
f. In the M&M block, Omega is the nominal samples per symbol and it need
not be integral. Omega relative limit is the maximum variation in omega
that you allow when recovering timing; in this case 0.005 is 0.5%, which is
pretty tight given an omega of 3.0 samples/symbol.
g. Nothing in this hier block deal with coarse frequency correction or the
phase ambiguity of the initial phase rotation, AFAICT. Hopefully you're
handling that somewhere else.
Post by Laur Joost
​
I don't think that follows. Real pulses being input to real functions,
Post by Andy Walls
yields real
outputs.
Complex filters are usually only needed when you need filter that is not
symmetrical about DC (your channel center, aka your baseband). If you
really
are at baseband (which you should be if performing clock recovery),
your pulse filter should not be complex, it will be real. Thus its
conjugate will be
real.
Thank you! That helped me understand something in another flowgraph.
You're welcome.

Regards,
Andy
Post by Laur Joost
Laur
Post by Andy Walls
Forgot to add the list
---------- Forwarded message ----------
From: Andy Walls
Date: Sat, Apr 16, 2016 at 4:16 PM
Subject: Re: [Discuss-gnuradio] matched filter for BPSK produced by phase
shifting
*From*: Laur Joost *Subject*: [Discuss-gnuradio] matched filter for BPSK
produced by phase shifting *Date*: Sat, 16 Apr 2016 19:30:29 +0300
------------------------------
Post by Laur Joost
Hi all!
Hi.
Post by Laur Joost
I need a clue where to start.
I have a signal that is BPSK that is modulated not by applying the
filtered
Post by Laur Joost
baseband to the in-phase component, but instead doing literal analog
phase
Post by Laur Joost
shifting.
Please provide a mathematical expression for the above. The description
is too
m_filt(t) = RRC_filter(m(t))
s(t) = sin(w_c *t + pi*m_filt(t))
Post by Laur Joost
The result is that the signal transitions between the -1 and 1 symbols
not
Post by Laur Joost
through zero, but instead along the unit circle.
Constant modulus, continuous phase - that's nice to work with.
A PLL or a Costas loop should lock and track well.
AGC can be simple.
Post by Laur Joost
The transmitted baseband is RRC-filtered.
Again, a picture, or sequence of mathematical statements describing the
modulation would be helpful.
Post by Laur Joost
1. Is Raised Cosine even a valid Nyquist filter for such a signal?
After all, the
Post by Laur Joost
actual In-phase transition occurs not according to the RRC response,
but
Post by Laur Joost
according to the sine OF the RRC.
Well, the Nyquist filter criteria can't be rigorously evaluated without
an expression
to work with. But it really doesn't matter.
If the transmitter used RRC, the matched filter in the receiver must be the
corresponding RRC filter. If it is not Nyquist, you'll get ISI; if it is
Nyquist, you
won't get ISI. You'll have to accept and work with the ISI you get.
Also, the receiver should be performing the matched filtering in a
demodulation
stage that corresponds to where the filter pulses were in the transmitter.
Post by Laur Joost
2. The response of such a modulator to a unit impulse is necessarily
complex.
I don't think that follows. Real pulses being input to real functions,
yields real
outputs.
Post by Laur Joost
From what I gather, the matched filter is then, also complex (time
reversed and
Post by Laur Joost
conjugated).
Complex filters are usually only needed when you need filter that is not
symmetrical about DC (your channel center, aka your baseband). If you
really
are at baseband (which you should be if performing clock recovery),
your pulse filter should not be complex, it will be real. Thus its
conjugate will be
real.
Post by Laur Joost
How should I go about this in GnuRadio, given that the PFB Clock
sync only takes real taps?
Do a separate matched filter with an FFT or FIR filter block, and follow
that with
an M&M clock sync block.
With a separate matched filter block, you unfortunately cannot use the
PFB clock sync block. It works with a peaked matched pulse filter and
that filter's derivative, so passing in a trivial filter like
[1,1,1,1,1,1,...,1] will cause the PFB clock sync block to crash.
Post by Laur Joost
3. Or can I just take the real part of the matched filter and feed that
to PFB
Post by Laur Joost
Clock sync? The constellation will have a weird spread (see picture).
Will
Post by Laur Joost
that affect either Costas or PFB?
Again, I don't think a complex baseband pulse filter makes sense.
BTW, on a slightly related note, taking only the real part of a _signal_
before
obtaining proper phase offset and bit timing is not a good idea.
You will degrade your SNR.
Depending on the the mathematical expression the modulator is
actually implementing, you may have to do something a little
different than the textbook GNURadio BPSK demodulation steps.
Post by Laur Joost
PS: The positioning of the constellation plots was not planned.
All the best,
Laur
Regards,
Andy
Loading...