Forum: GNU Radio About DPSK mod and demod

1f2a0d42238ca39c70bb68c3ef85e0db?d=identicon&s=25 Henry Jin (Guest)
on 2013-12-04 06:01
(Received via mailing list)
Hi,

I tried to build a simple flow graph of DPSK modulation and
demodulation.
The result is verified using the Error Rate module. The link shows the
flow
I'm using.

https://www.dropbox.com/s/jwmmttyi4es4alf/Screensh...

I know that the output of demod module is unpacked bytes, so an
"unpacked
to packed" module is attached after demodulation. However, the BER is
close
to 50%, which surely indicates something wrong. I further analyzed the
two
inputs of the Error Rate module by writing info to the file sink. It
clearly shows the discrepancy. So I just wonder what is wrong with this
flow graph. Could someone please help me?

Also, as I noticed, in the output file generated after "unpacked to
packed"
module, there are many consecutive 0s at the start of the file. Does
that
indicate something?

Suggestions are greatly appreciated!

Henry
0f670021207b3329243056244633dcad?d=identicon&s=25 Nick Foster (Guest)
on 2013-12-04 06:13
(Received via mailing list)
Can you try using the PSK mod/demod blocks with differential=Yes instead
of
the DPSK mod/demod blocks? I found an issue today with the DPSK
mod/demod
blocks which results in them not actually using differential encoding.

--n
1f2a0d42238ca39c70bb68c3ef85e0db?d=identicon&s=25 Henry Jin (Guest)
on 2013-12-04 18:53
(Received via mailing list)
I tried again replacing the DPSK module with PSK module. Still cannot
get
the correct data. The parameter for Error Rate "Bits per Symbol" is
changed
to 8 since every bit carries information in my flow. The sizes of the
files
from the two file sinks are exactly the same, except with different
data.
C539637020fd56193dd6daec746c4a84?d=identicon&s=25 Tom Rondeau (Guest)
on 2013-12-04 20:07
(Received via mailing list)
On Wed, Dec 4, 2013 at 12:52 PM, Henry Jin <henry.jin16@gmail.com>
wrote:
> I tried again replacing the DPSK module with PSK module. Still cannot get
> the correct data. The parameter for Error Rate "Bits per Symbol" is changed
> to 8 since every bit carries information in my flow. The sizes of the files
> from the two file sinks are exactly the same, except with different data.

Bits/symbol refers to the constellation. BPSK is 1 bit/sym, QPSK is 2
bit/sym, etc.

Tom
5b7bae5302f715f777bc9f683dea3c77?d=identicon&s=25 Michael Berman (Guest)
on 2013-12-04 20:15
(Received via mailing list)
Looking at your flowchart in the original post, you have an Unpacked to
Packed block after the demodulator, with bit's per symbol of 1.  This
doesn't seem right to me.  I have never tried this with a random source
like you have it setup, however there should be an Unpacked to Packed
block
prior to the modulator and a Packed to Unpacked block after the
demodulator.  These should also have bits per chunck values that
correspond
with the bits per symbol of the modulator and demodulator.  You need to
feed in the data in a chunk with the correct amount of bits that
correspond
to the bits per symbol of the modulation scheme being used.  In the
example, it looks like you are using QPSK, and therefore the bits per
chunk
should be 2 (which is log2(number of constellation points)).  The
modulator
and demodulator work with chunks of data where each chuck corresponds to
a
symbol.

For the Samples per Symbol, if I were transmitting over the air, I would
raise this value to a little bit more than 2, just to ensure the
receiver
can lock onto the changes with given noise before the symbol changes
again.
 In this case of looping the modulator strait into the demodulator, this
should work fine.

One more thing I would look at would be the Error Rate block source.  I
have never used this block, but in my thinking about it in this
flowchart,
I would source it from the throttle instead of the random source.  This
may
help with keeping the data a little more somewhat aligned.

Michael
1f2a0d42238ca39c70bb68c3ef85e0db?d=identicon&s=25 Henry Jin (Guest)
on 2013-12-04 22:32
(Received via mailing list)
On Wed, Dec 4, 2013 at 12:13 PM, Michael Berman <mrberman87@gmail.com>
 wrote:

> should be 2 (which is log2(number of constellation points)).  The modulator
> and demodulator work with chunks of data where each chuck corresponds to a
> symbol.
>

*If not using the random source, what other sources do you think it's
better? I know GLFSR source also perfectly fits into this scenario. You
also mentioned I have to attach a Unpacked to Packed block prior to the
modulator. But since in my flow, I already set the random source with
maximum being 256. That means it's already outputting packed bytes.
Thus,
IMO, Unpacked to Packed block is not needed based on my settings. The
reason I set the Bits per Chunk value as 1 in the Unpacked to Packed
block
after demodulation is that I notice in the source code, it says the
output
of the demodulation block is unpacked byte with only one LSB being
valid.
So In my understanding, it is independent of what modulations (BPSK,
QPSK,
etc) I'm using. *


>
> For the Samples per Symbol, if I were transmitting over the air, I would
> raise this value to a little bit more than 2, just to ensure the receiver
> can lock onto the changes with given noise before the symbol changes again.
>  In this case of looping the modulator strait into the demodulator, this
> should work fine.
>

*Thanks for the advice, I will take it. *


>
> One more thing I would look at would be the Error Rate block source.  I
> have never used this block, but in my thinking about it in this flowchart,
> I would source it from the throttle instead of the random source.  This may
> help with keeping the data a little more somewhat aligned.
>
>
*Yes, this could make things clearer. But maybe it makes no difference.
I
remember in one of Tom's tutorial, he said as long as there is one
throttle
in the flow, then all the units are throttled.*
5b7bae5302f715f777bc9f683dea3c77?d=identicon&s=25 Michael Berman (Guest)
on 2013-12-05 22:24
(Received via mailing list)
Henry,

I looked at this and some of the underlying code, and tried to run your
example with some modifications, but all to no avail as to what you are
attempting to do.  Last time I did anything like this I ended up using
the
mod_pkts code (found in gr-digital/python/digital/pkt.py).  Maybe there
is
some insight in there that may shed light on what you are trying to do.
 Sorry I couldn't be of more help.

Michael
1f2a0d42238ca39c70bb68c3ef85e0db?d=identicon&s=25 Henry Jin (Guest)
on 2013-12-05 22:41
(Received via mailing list)
Thanks for your effort in trying to help, Michael. I will continue to
study
and if I managed to get it working, I will keep you updated.

Henry
1f2a0d42238ca39c70bb68c3ef85e0db?d=identicon&s=25 Henry Jin (Guest)
on 2013-12-09 05:58
(Received via mailing list)
Hi all,

As per previous discussions, I have changed my design as shown in the
link
https://www.dropbox.com/s/8pw27f29qf5unuq/Screensh...

This time, QPSK and BPSK both works as I compared the files generated.
However, I found two more problems:
1. When Error Rate module is enabled, the simulation can only be run for
one or two seconds, then it gets stuck. This was observed by attaching a
scope in the flowgraph. The display of the scope is never able to be
updated. Just wonder why this happens?
2. When DPSK Mod and Demod blocks are replaced by QAM Mod and Demod, I
find
that many packets are missing in the receiver's decoded file compared to
the file on the sender side. Except the missing packets, all other
packets
in the receiver's decoded file can perfectly match with the ones sent.
So
what has caused this issue? To make it better understood, I attached a
screenshot comparing the two files from file sinks.
https://www.dropbox.com/s/9203fvigi3wohmh/Screensh...

Please give me some suggestions if you have any thoughts. Thanks.
Henry
032d0c37db78313ea467ed8a1d4927a1?d=identicon&s=25 Wayne Roberts (Guest)
on 2013-12-14 19:20
(Received via mailing list)
I i try that DQPSK schema myself, but i notice that in your image you
have
Bits per symbol in packet encoder set to 4, but the help of packet
encoder
says 2 for DQPSK.

I try 2, and i get no errors until the end, probably because of file
buffering.
--- sent.hex    2013-12-14 10:11:41.308775941 -0800
+++ got.hex     2013-12-14 10:11:52.269776677 -0800
@@ -62206,259 +62206,3 @@
 00f2fd0: 4db3 ace4 e63f eb53 3fb3 e20a 6cdf 85ab  M....?.S?...l...
 00f2fe0: 1a29 0ae6 3816 2e64 bd37 dc08 6982 379b  .)..8..d.7..i.7.
 00f2ff0: fd0d 6dc5 0d68 53e9 0384 8234 3af2 9861  ..m..hS....4:..a
-00f3000: 1625 7ce9 c0aa 64e6 9272 6ce2 9dce d524  .%|...d..rl....$
-00f3010: 1d0f 748e bcfb 88a8 f9ee 3504 1dd4 7204  ..t.......5...r.

bytes_sent file has 999424 bytes
and bytes_received has 995328 bytes.
The difference is probably that 1 million samples from random source
isnt
even to the payload length of packet encoder.
1f2a0d42238ca39c70bb68c3ef85e0db?d=identicon&s=25 Henry Jin (Guest)
on 2013-12-14 21:09
(Received via mailing list)
Hi Wayne

I agree with every point you mentioned in your reply. For the variable
Bits
per symbol, that was a mistake since I previously used it to test QAM.

So, have you tested QAM? In my test, the two files didn't match as
discussed in my previous post. Just curious about why this mismatch can
happen. Thanks.

Have a good weekend
Henry
032d0c37db78313ea467ed8a1d4927a1?d=identicon&s=25 Wayne Roberts (Guest)
on 2013-12-15 01:51
(Received via mailing list)
There isnt any QA code for QAM modulator or demodulator.
They do not work for me.
I think if they worked, then their would be QA code.
1f2a0d42238ca39c70bb68c3ef85e0db?d=identicon&s=25 Henry Jin (Guest)
on 2014-01-11 01:18
(Received via mailing list)
Hi all,

I managed to find out the reason why error rate module cannot work. Just
want to share my thoughts and hopefully it can help other guys when they
want to do similar simulation.

As cited in my previous post below, I tried to evaluate the BER
performance
using GRC for DPSK modulation and demodulation. I made a mistake in this
flowgraph since there is no synchronization module. So, we have to add
some
training sequence to the stream sent and do a correlation after the
demodulation. In this way, the streams can be synchronized and the bit
error rate can be correctly calculated. Of course, since we have to add
some customized modules, the best way is to directly work on the python
script.

Best
Henry

On Tue, Dec 3, 2013 at 10:00 PM, Henry Jin <henry.jin16@gmail.com>
wrote:

> to packed" module is attached after demodulation. However, the BER is close
> to 50%, which surely indicates something wrong. I further analyzed the two
> inputs of the Error Rate module by writing info to the file sink. It
> clearly shows the discrepancy. So I just wonder what is wrong with this
> flow graph. Could someone please help me?
>
> Also, as I noticed, in the output file generated after "unpacked to
> packed" module, there are many consecutive 0s at the start of the file.
> Does that indicate something?
>
> Suggestions are greatly appreciated!
>
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.