4
$\begingroup$

I'm doing the baby steps right now to learn about GNU Radio Companion. I'm using 3.7.13.5 at the moment.

I'm just focusing on getting a simple binary stream together, such as '110100' (repeated) .... so it just goes '110100110100110100.......' and then to see whether I can generate a simple QAM constellation map.

I don't yet understand exactly what to do in order to get that QAM constellation map. But I've taken steps to string some blocks together - just to try something at least.

What I did was use a Vector Source block, that is set up at values '110100' (and this block is set to 'repeat' the pattern continually).

I then have a Chunks To Symbol block, where I arbitrarily have these following values for the Symbol Table [(-0.707 -0.707j), (0.707 -0.707j), (0.707 + 0.707j), (-0.707 + 0.707j)].

And then I have the QT GUI Constellation Sink block for viewing the constellation.

I know what I would like to do ----- but don't know what to do properly yet. But at least there are four points on the constellation diagram (as seen in the attached image).

May I ask what I need to do in order to get the Chunks To Symbols block to take in two bits at a time, in order to map each pair of bits to one of those four constellation points?

At the moment, I only have three unique combinations of bits .... which is 11 and 01 and 00 .... which can be seen in the pattern '110100'. So I'm just trying to get those three patterns to show up on the constellation diagram --- which should be three points on the constellation diagram (while the fourth point isn't encountered yet).

Could somebody help me by pointing out how the Chunks To Symbols block actually works? At the moment, if I purposely want to map the bit pair '11' to a particular constellation point - such as 0.707 + j*0.707, then is there a way to create that definition within the Chunks to Symbols block settings?

Right now, I don't actually know how the Chunks To Symbols block interprets the input data, and how it assigns various 'chunks' (which I assume are bit patterns) to each constellation point in the symbol map. That is, does this block look for various unique input patterns, and somehow links each unique input pattern to one of those values in the Symbol Map?

Chunks to Symbols

Thanks very much in advance! I'm very impressed with GNU Radio Companion and GNU Radio!

==============================

Update - I found one other path for getting a constellation diagram. But haven't figured out how to use that properly yet as well. The other path is using a Constellation Object, where an online tutorial had this Symbol Map for the constellation : [0, 1, 3, 2] and the corresponding constellation points defined within the Constellation Object block are : [-1-1j, -1+1j, 1+1j, 1-1j]

But - as we can see, when I put a single value of '3' for the repeating Vector Source, I get multiple points in the constellation diagram spread out across a line, instead of a concentration of points around the point 1+1j. Any nice recommendations on what I need to do to get on the right track? Thanks!

second image

====================================

Another UPDATE after receiving help from Marcus, and his kind explanation. My understanding of how the Chunks To Symbols block works is like this. If for example the symbol table has complex numbers in this order [-1-1j, -1+1j, 1+1j, 1-1j], then the Vector Source values '0', '1', '2', and '3' (ie. four values) will correspond to '-1-1j', '-1+1j', '1+1j', and '1-1j' (in that same order). For example, a vector value of '3' will be linked to '1-1j', while '0' will be linked to '-1-1j'.

And if we want those values '0', '1', '2'and '3' to be associated with different complex numbers, then we would simply need to change the order of the complex numbers in the Symbol Table section of the Chunks to Symbols block (inside the settings).

After help from Marcus, and also upgrading to GNU Radio Companion 3.8 ---- I now have the constellation diagram working properly with the Chunks To Symbols block. Here, I created a vector with four lots of '3', followed by four lots of '1'. So the constellation diagram plots 1-1j four times, and then it plots -1-1j four times. We only see two dots because 1-1j and -1-1j are both plotted four times each.

working properly

Also, changing the topic to the other method - involving the 'Constellation Object' block for generating constellation diagrams ---- I now know why I get a spread of points across a line. I notice that if I have a Vector Source that repeatedly outputs the value '3', which means outputting a 3, then another 3, then another 3 etc ....... then the associated complex value (that was assigned to '3' in the Constellation's Symbol Map) --- such as 1+1j (which is expected), but the next plotted point will not be 1+1j (associated with the next '3'). Instead, the Constellation plotter appears to jump back to the same initial starting point. So rather than plotting multiple points of 1+1j, the constellation plotter keeps jumping back to an initial starting point (consistently the same starting point - in this case -1-1j - which is the first value in the Constellation's Symbol Map) before plotting the next 'expected' complex value. I don't know why it does that yet. This is where I need more help too! Thanks again!

$\endgroup$
2
  • $\begingroup$ Please please please, the GNU Radio 3.7.x release series is just a legacy platform for people that already have a lot of things developed that rely on GNU Radio 3.7; if you're starting to learn GNU Radio, please start with 3.8, as there's far higher chance that bugs you find will get fixed (we can't fix a lot of stuff on 3.7; anything bugfix that breaks something existing is impossible), and the community is still able to run your flow graphs and help you. I don't know on which OS you are, but anything more modern than debian stable (buster,3.7.13.4) has access to GNU Radio 3.8 out of the box. $\endgroup$ Commented Mar 30, 2021 at 6:34
  • $\begingroup$ All the tutorials on the GNU Radio website are also GNU Radio 3.8 or 3.9; starting with 3.7 just poses additional hurdles. $\endgroup$ Commented Mar 30, 2021 at 6:35

1 Answer 1

2
$\begingroup$

I then have a Chunks To Symbol block, where I arbitrarily have these following values for the Symbol Table [(-0.707 -0.707j), (0.707 -0.707j), (0.707 + 0.707j), (-0.707 + 0.707j)].

Sounds pretty sensible to me

May I ask what I need to do in order to get the Chunks To Symbols block to take in two bits at a time, in order to map each pair of bits to one of those four constellation points?

Chunks to symbol takes in one item at a time; you need to put in as many bits into that item as is right for your use case.

You could do that by putting values from {0,1,2,3} in your vector source, e.g. [0, 2, 3, 1, 0].

Or you could just convert your "one bit per item" stream to "two bits per item" using the Unpacked to Packed block.

Could somebody help me by pointing out how the Chunks To Symbols block actually works? At the moment, if I purposely want to map the bit pair '11' to a particular constellation point - such as 0.707 + j*0.707, then is there a way to create that definition within the Chunks to Symbols block settings?

As said, you need to put these two bits into a single item you feed to that block.

That block is really just a lookup table – it takes an input item, and uses it to as index into the vector of symbols you've fed in.


I said that in the comments, but let me repeat:

GNU Radio has tutorials, and a lively community. But: both of these things have moved on to GNU Radio 3.8 or 3.9 as of now. If you have a big legacy GNU Radio system that still runs on 3.7, that's fine, that's why we still have the legacy 3.7 maintenance range. But, learning GNU Radio, you really shouldn't be sticking to such legacy – it's really problematic. Relying on things like Python2, GNU Radio 3.7 simply is not possible to port to modern systems reasonably. That's why we had to release 3.8; please, don't put yourself in a dead end by starting with GNU Radio 3.7 now.

You say you've got GNU Radio 3.7.13.5, and that's newer than what's in debian stable. So, you're not on that. Chances are that if you can update your Linux Distro (or BSD) to a newer version, you get GNU Radio 3.8 or 3.9 out of the box. On Windows or OS X, I'd recommend anaconda as installation method, also very smooth and no manual builds involved.

$\endgroup$
4
  • $\begingroup$ Thanks so much for your time and help Marcus! That helped tremendously. I have now gone with that nice recommendation - and downloaded/installed v3.8.2.0-57-gd71cd177 (Python 3.9.0). The graphics in the GUI appear much more advanced in the 3.8! After understanding how the 'chunks to symbols' works (after you explained it excellently) ---- I now see that the symbol table (having the four complex numbers) are tied to the values 0, 1, 2, 3. So that if I choose '3' for the vector, then the corresponding constellation symbol will be the last complex number, while '0' links to the 1st complex value. $\endgroup$
    – Kenny
    Commented Mar 30, 2021 at 7:38
  • $\begingroup$ Also - regarding the unexpected behaviour I noticed with the constellation plot ---- it turns out (after help from a GitHub member) that the Vector Source value of '3' requires a "Unpacked to Packed" block to be placed at the output of the Vector Source. That Unpacked to Packed block simply needs to be set at 2 bits per chunk, with 'byte' for the Type (setting). And then the output of that block can go to the Throttle block. Everything works nicely after doing that. $\endgroup$
    – Kenny
    Commented Apr 6, 2021 at 7:57
  • $\begingroup$ yep, I did mention that in my answer, too ;) $\endgroup$ Commented Apr 6, 2021 at 10:59
  • $\begingroup$ Thanks Marcus! Just for clarity - I'll add the link that discusses the setback that I was having befor - due to initially not understanding some details about the Vector Source and the Constellation Modulator ----- dsp.stackexchange.com/questions/74232/… $\endgroup$
    – Kenny
    Commented Apr 6, 2021 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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