Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-20 Thread Matthew J. Brandsema
Ah thanks! Makes perfect sense!

For my transmit/receive issue, I found out there is always a random phase 
offset upon tuning of the LOs.  So I set up a matlab script that will correlate 
the two IQ streams and find this offset.  While it is still running, I 
implement this offset in GNU and I do indeed see the BER drop.

The issue is, it doesn't drop very deep. Certainly not like the example 
simulation.  I need to investigate the waveforms to see if there is too much 
noise.  I will look at this over the next few days and if I have any more 
questions I will report back here.  I don't want to overstay my welcome in 
regards to asking too many questions.

Thanks again!

From: Achilleas Anastasopoulos [anas...@umich.edu]
Sent: Tuesday, November 20, 2018 3:08 PM
To: Matthew J. Brandsema
Cc: Discuss-gnuradio@gnu.org
Subject: Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

Hi Mathew,

the random source outputs bytes with numbers 0 or 1 (NOT 2).
This single bit information is "packed" into a byte that is the input to the 
QAM modulator.
The QAM modulator internally breaks up these bytes and uses every 4 bits to 
signal the 16QAM constellation.

best,
Achilleas



On Tue, Nov 20, 2018 at 3:03 PM Matthew J. Brandsema 
mailto:mjb...@arl.psu.edu>> wrote:
Hello,

When I switched AC coupling off, it just went blank.

So instead, I saved the waveforms to a file and plotted the result in Matlab.  
See attached for plots.  The blue curve are the data before modulating, and the 
red x's are the data after demodulating.  They are lined up!

Thanks so much for the help in getting this working!!!  I noticed the random 
numbers are only 0, 1 and 2.  How the heck does this work for 16 QAM?  How does 
it encode 3 numbers to 16 symbols?

My next step is to transmit and receive using two Ettus radios next.  I got 
them to transmit and receive but I can't seem to find a delay that will make 
them sync up like I did with the file you sent.

I saved their IQ waveforms to see how out of sync they are by doing a 
correlation and the correlation peak seem to be changing between data collects. 
Does anyone have any idea of what might be happening? (Sorry to add another 
question, I have been trying all day to get this working).

From: Achilleas Anastasopoulos [anas...@umich.edu<mailto:anas...@umich.edu>]
Sent: Tuesday, November 20, 2018 1:25 PM
To: Matthew J. Brandsema; 
Discuss-gnuradio@gnu.org<mailto:Discuss-gnuradio@gnu.org>
Subject: Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

Can you switch off the AC-coupling, and check the scope plot again.
Also, maybe useful to have markers instead of just lines.

The two streams should be perfectly synchronized (for low noise) and as noise 
gets higher
some of the demodulated bits are in error. This is perfectly OK.

Achilleas
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-20 Thread Achilleas Anastasopoulos
Hi Mathew,

the random source outputs bytes with numbers 0 or 1 (NOT 2).
This single bit information is "packed" into a byte that is the input to
the QAM modulator.
The QAM modulator internally breaks up these bytes and uses every 4 bits to
signal the 16QAM constellation.

best,
Achilleas



On Tue, Nov 20, 2018 at 3:03 PM Matthew J. Brandsema 
wrote:

> Hello,
>
> When I switched AC coupling off, it just went blank.
>
> So instead, I saved the waveforms to a file and plotted the result in
> Matlab.  See attached for plots.  The blue curve are the data before
> modulating, and the red x's are the data after demodulating.  They are
> lined up!
>
> Thanks so much for the help in getting this working!!!  I noticed the
> random numbers are only 0, 1 and 2.  How the heck does this work for 16
> QAM?  How does it encode 3 numbers to 16 symbols?
>
> My next step is to transmit and receive using two Ettus radios next.  I
> got them to transmit and receive but I can't seem to find a delay that will
> make them sync up like I did with the file you sent.
>
> I saved their IQ waveforms to see how out of sync they are by doing a
> correlation and the correlation peak seem to be changing between data
> collects. Does anyone have any idea of what might be happening? (Sorry to
> add another question, I have been trying all day to get this working).
> --
> *From:* Achilleas Anastasopoulos [anas...@umich.edu]
> *Sent:* Tuesday, November 20, 2018 1:25 PM
> *To:* Matthew J. Brandsema; Discuss-gnuradio@gnu.org
> *Subject:* Re: [Discuss-gnuradio] Packet Decoder Breaking when adding
> noise
>
> Can you switch off the AC-coupling, and check the scope plot again.
> Also, maybe useful to have markers instead of just lines.
>
> The two streams should be perfectly synchronized (for low noise) and as
> noise gets higher
> some of the demodulated bits are in error. This is perfectly OK.
>
> Achilleas
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-20 Thread Matthew J. Brandsema
Hello,

When I switched AC coupling off, it just went blank.

So instead, I saved the waveforms to a file and plotted the result in Matlab.  
See attached for plots.  The blue curve are the data before modulating, and the 
red x's are the data after demodulating.  They are lined up!

Thanks so much for the help in getting this working!!!  I noticed the random 
numbers are only 0, 1 and 2.  How the heck does this work for 16 QAM?  How does 
it encode 3 numbers to 16 symbols?

My next step is to transmit and receive using two Ettus radios next.  I got 
them to transmit and receive but I can't seem to find a delay that will make 
them sync up like I did with the file you sent.

I saved their IQ waveforms to see how out of sync they are by doing a 
correlation and the correlation peak seem to be changing between data collects. 
Does anyone have any idea of what might be happening? (Sorry to add another 
question, I have been trying all day to get this working).

From: Achilleas Anastasopoulos [anas...@umich.edu]
Sent: Tuesday, November 20, 2018 1:25 PM
To: Matthew J. Brandsema; Discuss-gnuradio@gnu.org
Subject: Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

Can you switch off the AC-coupling, and check the scope plot again.
Also, maybe useful to have markers instead of just lines.

The two streams should be perfectly synchronized (for low noise) and as noise 
gets higher
some of the demodulated bits are in error. This is perfectly OK.

Achilleas
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-20 Thread Achilleas Anastasopoulos
Can you switch off the AC-coupling, and check the scope plot again.
Also, maybe useful to have markers instead of just lines.

The two streams should be perfectly synchronized (for low noise) and as
noise gets higher
some of the demodulated bits are in error. This is perfectly OK.

Achilleas
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-20 Thread Achilleas Anastasopoulos
There is something really disturbing with your plots:

The values have to be either 0 or 1 (recall they are the
transmitted/demodulated bits).
Yet, you have values in the range 0.6-0.8...

Are you sure the plots correspond to the flowgraph you posted?

Achilleas
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-20 Thread Achilleas Anastasopoulos
It is important that you have a time scope where you compare the initial
bit stream with the output of the demodulator.
These are NOT synchronized.
Unless you do that you cannot get any meaningful measurement of the BER!

You can substitute the Qt blocks with WX blocks. This is easy.

Achilleas


On Tue, Nov 20, 2018 at 7:36 AM Matthew J. Brandsema 
wrote:

> Hello,
>
> I don't have QT gui so I had to convert to WX blocks (how do I install
> QT?). I cannot get the BER to change appreciably, no matter what delay I
> set.  The best I can get it to is only about -1 dB.  I will keep playing
> with it.
> --
> *From:* Achilleas Anastasopoulos [anas...@umich.edu]
> *Sent:* Monday, November 19, 2018 5:37 PM
> *To:* Matthew J. Brandsema; Discuss-gnuradio@gnu.org
> *Subject:* Re: [Discuss-gnuradio] Packet Decoder Breaking when adding
> noise
>
> I attach a simple grc file that works for me.
>
> Using the delay10/delay sliders try to align the input/output bit stream.
> (in this example this happens at delay=12, but it may be different for
> you...)
>
> Then play with the noise variance; you will see the BER changing slowly as
> you go around values = -6,-5,-4
>
> let me know if this works for you,
> Achilleas
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-20 Thread Matthew J. Brandsema
I just got it to go to -18 dB at a delay of 24.  I apologize, my previous email 
was premature.  Let me play around a bit more before emailing.

From: Matthew J. Brandsema
Sent: Tuesday, November 20, 2018 7:36 AM
To: anas...@umich.edu; Discuss-gnuradio@gnu.org
Subject: RE: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

Hello,

I don't have QT gui so I had to convert to WX blocks (how do I install QT?). I 
cannot get the BER to change appreciably, no matter what delay I set.  The best 
I can get it to is only about -1 dB.  I will keep playing with it.

From: Achilleas Anastasopoulos [anas...@umich.edu]
Sent: Monday, November 19, 2018 5:37 PM
To: Matthew J. Brandsema; Discuss-gnuradio@gnu.org
Subject: Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

I attach a simple grc file that works for me.

Using the delay10/delay sliders try to align the input/output bit stream.
(in this example this happens at delay=12, but it may be different for you...)

Then play with the noise variance; you will see the BER changing slowly as you 
go around values = -6,-5,-4

let me know if this works for you,
Achilleas
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-20 Thread Matthew J. Brandsema
Hello,

I don't have QT gui so I had to convert to WX blocks (how do I install QT?). I 
cannot get the BER to change appreciably, no matter what delay I set.  The best 
I can get it to is only about -1 dB.  I will keep playing with it.

From: Achilleas Anastasopoulos [anas...@umich.edu]
Sent: Monday, November 19, 2018 5:37 PM
To: Matthew J. Brandsema; Discuss-gnuradio@gnu.org
Subject: Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

I attach a simple grc file that works for me.

Using the delay10/delay sliders try to align the input/output bit stream.
(in this example this happens at delay=12, but it may be different for you...)

Then play with the noise variance; you will see the BER changing slowly as you 
go around values = -6,-5,-4

let me know if this works for you,
Achilleas
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-19 Thread Achilleas Anastasopoulos
I attach a simple grc file that works for me.

Using the delay10/delay sliders try to align the input/output bit stream.
(in this example this happens at delay=12, but it may be different for
you...)

Then play with the noise variance; you will see the BER changing slowly as
you go around values = -6,-5,-4

let me know if this works for you,
Achilleas


test_QAM.grc
Description: Binary data
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-19 Thread CEL
Hi Matt, 

why did you use K=8, then? As far as I can see, a 16-QAM carries
log_2(16)=4 bit of data per symbol, not 8.

Also: packet decoder is in the "deprecated" category for good reason:
it randomly, non-debuggably (as far as I can tell) drops data.

While you're at it, I'd recommend replacing your WX visualization
blocks with their Qt counterparts – we've already removed WX from the
current development version of GNU Radio, and it won't be part of GNU
Radio 3.8.

Best regards,
Marcus

On Mon, 2018-11-19 at 16:17 +, Matthew J. Brandsema wrote:
> Hello,
>  
> Thanks for your replies!
>  
> When I do that, the demodulator outputs unpacked bytes (0s and 1s).  I tried 
> using the “Pack K Bits” and “Unpacked to Packed” blocks separately (setting K 
> = 8) and it did not work.
>  
> By “did not work” I mean, my input into the modulator were numbers between 0 
> and 15, and when I pack 8 bits at a time, I get numbers between 0 and 255.
>  
> ---
> Matt Brandsema
> Assistant Research Professor
> Applied Research Laboratory at Penn State University
> Phone: c: (201) 259-3584 w: (814) 865-5783
>  
> From: Achilleas Anastasopoulos [mailto:anas...@umich.edu] 
> Sent: Monday, November 19, 2018 10:15 AM
> To: Matthew J. Brandsema ; Discuss-gnuradio@gnu.org
> Subject: [Discuss-gnuradio] Packet Decoder Breaking when adding noise
>  
> ...neither do you want the extended FEC encoder/decoder.
>  
> Just send random symbols through the QAM modulator, add noise and demodulate 
> with the QAM demodulator.
>  
> Achilleas
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-19 Thread Matthew J. Brandsema
Hello,

Thanks for your replies!

When I do that, the demodulator outputs unpacked bytes (0s and 1s).  I tried 
using the “Pack K Bits” and “Unpacked to Packed” blocks separately (setting K = 
8) and it did not work.

By “did not work” I mean, my input into the modulator were numbers between 0 
and 15, and when I pack 8 bits at a time, I get numbers between 0 and 255.

---
Matt Brandsema
Assistant Research Professor
Applied Research Laboratory at Penn State University
Phone: c: (201) 259-3584 w: (814) 865-5783

From: Achilleas Anastasopoulos [mailto:anas...@umich.edu]
Sent: Monday, November 19, 2018 10:15 AM
To: Matthew J. Brandsema ; Discuss-gnuradio@gnu.org
Subject: [Discuss-gnuradio] Packet Decoder Breaking when adding noise

...neither do you want the extended FEC encoder/decoder.

Just send random symbols through the QAM modulator, add noise and demodulate 
with the QAM demodulator.

Achilleas
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-19 Thread Achilleas Anastasopoulos
...neither do you want the extended FEC encoder/decoder.

Just send random symbols through the QAM modulator, add noise and
demodulate with the QAM demodulator.

Achilleas
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Packet Decoder Breaking when adding noise

2018-11-19 Thread Achilleas Anastasopoulos
There is no reason to have packet encoder/decoder in your system if you
only want to measure BER for QAM.

Achilleas
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio