discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add fec in GMSK


From: Quenten .
Subject: Re: How to add fec in GMSK
Date: Wed, 29 Apr 2020 15:28:54 +0200

Hello,

Thank you for your reply. But if it is needed to make my own block then I am in trouble. This is because in the version of GRC I use (3.7.11) there is something wrong with opening the editor in the python block (I tried the default, notepad++, notepad, pyscripter ,.. => none will open)

But still thank for your useful advice I will try.

Best regards,

Q

Op wo 29 apr. 2020 om 15:06 schreef Kyeong Su Shin <address@hidden>:
Hello Quenten:

Hamming code is just an example, I am not suggesting you to implement it.  What I want to say is that, the decoder usually needs to know where the code block starts and where it ends in order to correctly decode it, just like in case of the Hamming code. That is why you need to use packets or frames in this situation. You need to align your data for the decoder before putting it in.

Since the whole point of using frames or packets (in this case) is to align your data for the FEC decoder, you want to make sure that each frame (or packet) contains nicely aligned encoded code blocks. If it doesn't, then it is pretty much useless. If the frame generator or packet generator requires zero paddings in order to achieve this, then you do the zero padding (you can strip the paddings before pusing the data to the decoder). Also, this generally means that you will want to fix the payload size of your packets or frames to some integer multiple of the code length (clearly, this is not about the UDP payload size).

Also, zero paddings are often necessary for convolutional codes, which you are using. I do not remember the exact math behind this, so you will have to rely on a textbook (or maybe someone else's reply).  GNU Radio's cc_encoder will help you with this, but I do not remember if it is sufficient. See: https://www.gnuradio.org/doc/doxygen/classgr_1_1fec_1_1code_1_1cc__encoder.html .

For packetized data, you can refer to example codes at https://github.com/gnuradio/gnuradio/tree/maint-3.7/gr-digital/examples/packet . You can also write your own GNU Radio blocks, as suggested in https://wiki.gnuradio.org/index.php/Tutorials . Writing blocks can be a bit difficult on a Windows system, however (works better on Linux). In that way, pretty much anything is possible (You can still write Embedded Python Blocks on Windows without much hassle).

Regards,
Kyeong Su Shin

보낸 사람: Quenten . <address@hidden>
보낸 날짜: 2020년 4월 29일 수요일 오후 9:15
받는 사람: Kyeong Su Shin <address@hidden>
참조: address@hidden <address@hidden>
제목: Re: How to add fec in GMSK
 
Hello,

Yes I know what hamming code is(I have had the theory but also only the theory, no real life experience). 
But I don't know any way how to add it in GNU radio (A lot of examples on the internet used a LP, and yeah i know not everything on the internet can be trusted). 
What I am doing here with this 'test' flowgraph is to try to solve the problem the I had in this post: https://lists.gnu.org/archive/html/discuss-gnuradio/2020-04/msg00148.html. I also tested just the source and sink with the packet en-/decoder but there wasn't even a output signal (so I will not use these anymore unless suggested otherwise).

And you tals about :add paddings and tails on your packets and fix the paylod size to a certain number to get things working. Why Where and how  do you  do it.
Ps if you are talking about the payloadsize of the UDP I have already adjusted these so they work without the '(de)modulation techniques'(UDP source to sink).

Someone advised me that this could be  possibly solved with using FEC

Op wo 29 apr. 2020 om 10:44 schreef Kyeong Su Shin <address@hidden>:
Hello Quenten:

"Hamming Code" is a type of an forward-error correction code (FEC). See: https://en.wikipedia.org/wiki/Hamming_code . It is not related to low-pass filtering (you really should not have that there).  I mentioned Hamming Code because it is usually the first code that you learn in the school.

For an example, Hamming(7,4) takes a 4-bit data, and generates a 7-bit code. That means, if you use Hamming(7,4), the payload size of the "Oacket Encoder" (which you really shoudn't be using, but I guess you already know that) must be an integer multiple of 7 (bits). If you don't do that, you will need to implement additional handling processes to fix that.

In your flow graph, you are using Convolutional Code (which is not a linear code), instead of Hamming Code (which makes sense, as Hamming Code usually makes little sense on wireless communication system). Still, you have to take similar issues into your consideration. I don't remember the exact details (I didn't use Convolutional code much), but you may have to add paddings and tails on your packets and fix the paylod size to a certain number to get things working (go through WiFi OFDM PLCP and WiFi convolutional code tutorials, if you are sticking with Convolutional code).

Also, I do not see the "Packet Decoder" in your flowgraph.

WX GUI is no longer supported, and some error messages that you posted are about WX GUI, so consider using QT GUI instead.

Finally, please note that it will still miss some packets (mostly during the beginning of the transmission).

(I added address@hidden back to the recipant list.)

Regards,
Kyeong Su Shin

보낸 사람: Quenten . <address@hidden>
보낸 날짜: 2020년 4월 29일 수요일 오후 4:57
받는 사람: Kyeong Su Shin <address@hidden>
제목: Re: How to add fec in GMSK
 
hello, Kyeong Su Shin,

I added hamming with a low pass filter(only way I know how to add Hamming in flowgraph) but when I run this is get the following results from GNU:

bits per symbol = 1
Gaussian filter bt = 0.35
bits per symbol = 1
M&M clock recovery omega = 4.000000
M&M clock recovery gain mu = 0.175000
M&M clock recovery mu = 0.500000
M&M clock recovery omega rel. limit = 0.005000
frequency error = 0.000000
Warning: the blks2.packet_encoder block is deprecated.        
(I know why these are here)  
Warning: the blks2.packet_decoder block is deprecated.        
(I know why these are here)
gr::pagesize: no info; setting pagesize = 4096
C:\Program Files\GNURadio-3.7\gr-python27\lib\site-packages\numpy-1.12.0-py2.7-win-amd64.egg\numpy\core\_methods.py:116: RuntimeWarning: overflow encountered in multiply
  x = um.multiply(x, x, out=x)
C:\Program Files\GNURadio-3.7\lib\site-packages\gnuradio\wxgui\common.py:272: RuntimeWarning: invalid value encountered in add
  return mean - factor*ampl, mean + factor*ampl
C:\Program Files\GNURadio-3.7\lib\site-packages\gnuradio\wxgui\common.py:272: RuntimeWarning: invalid value encountered in subtract
  return mean - factor*ampl, mean + factor*ampl


For the result ofthe graphs see file attached.


I added the Low Pass in the original Grc before the Gmsk Demod, as can be seen below:

image.png


Best regards,


Q


Op ma 27 apr. 2020 om 17:50 schreef Kyeong Su Shin <address@hidden>:
Hello Quenten:

Just to elaborate a bit further:  If you did something that is suggested in the example files, and failed to get your flowgraph working, it is probably because your data is no longer frame-synchronized after the mod / demod blocks (yes, that happens, both in simulations and in real-world environments), and error correction codes usually require them to be frame-synchronized.  So, what you will have to look into is frame sync or packet design.

Also, you will have to design your frames with your FEC algorithm in your mind. Simple linear-algebraic algorithms, like Hamming code, will require you to set your frame length to a multiple of some integer. Convolutional code additionally requires you to pad some zeros to your frames, but I forgot the details about it. 

Regards,
Kyeong Su Shin


보낸 사람: Kyeong Su Shin <address@hidden>
보낸 날짜: 2020년 4월 28일 화요일 오전 12:23
받는 사람: Quenten . <address@hidden>; address@hidden <address@hidden>
제목: Re: How to add fec in GMSK
 
Hello Quenten:

You may want to look at some example codes at https://github.com/gnuradio/gnuradio/tree/maint-3.7/gr-fec/examples  (from maint-3.7 branch since you are apparently using GR3.7).  

Please note that most error correction codes require frame synchronization (at least on real-world situations).

Regards,
Kyeong Su Shin

보낸 사람: Quenten . <address@hidden> 대신 Discuss-gnuradio <discuss-gnuradio-bounces+ksshin=address@hidden>
보낸 날짜: 2020년 4월 27일 월요일 오후 10:31
받는 사람: address@hidden <address@hidden>
제목: How to add fec in GMSK
 
Hello all,

I have previous posted a question concerning frame drops in GNU radio when using GMSK. (https://lists.gnu.org/archive/html/discuss-gnuradio/2020-04/msg00148.html)
On this mail someone answered that I should use OFMD (what I normally should consider because this is better), but my prof told me to focus on GMSK and also told me to include FEC. I know with one I should use, it is either the FEC en-/decoder or the Extended FEC en-/decode, because I shall stream data cte. 
So my question is how do you include this because I have tried but didn't succeed.
In the file attached you will find the grc with the FEC en-/decoder. Help would be appreciated.

Best regards,

Q



reply via email to

[Prev in Thread] Current Thread [Next in Thread]