Re: [Discuss-gnuradio] python Hier block using callback

2015-04-27 Thread Marcus Müller
Hi Themba,

in principle, what you describe sounds right; can you insert some 'print
"set_foobar called"'' in the set methods of your hier block, to check
whether they are actually being called?

Greetings,
Marcus


On 04/27/2015 08:43 AM, THEMBA WELCOME MATHUMO wrote:
> Hi all;
>
> I created a python hier block using signal source and a VCO, but  I
> want to be able to control parameters like amplitude, sensitivity etc
> il real time using sliders.
>
> I used callback tag on xml together with the set method but it does
> not work, the parameters does not seem to change at all.
>
> is it possible to achieve what I am trying to do? how can I do it.
>
> your help will be much appreciated.
>
> Regards
>
> Fanatic
>
>
> ___
> 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] No scope with gr?

2015-04-27 Thread Ralph A. Schmid, dk5ras
Hi,

> Hi Ralph,
> 
> first of all: that's the WX GUI Scope, right?

Yes.
 
> > Where can I start searching for the reason?
> Do other Instrumentations from the same GUI framework work?

The WX GUI Waterfall Sink works as always. 

Usually I do not use those gfx stuff that much, I just stumbled over it when
firing up my DSD+ flow for DMR radio decoding, then I tried other flows
using WX GUI Scope Sink, with the same result.

> Tough one, but I'd tackle this with a debug build and GDB:
> http://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsGDB

Looks complicated to a Windows guy like me, may take some days until I find
time for such an adventure :)

> Greetings,
> Marcus

Ralph.


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


Re: [Discuss-gnuradio] python Hier block using callback

2015-04-27 Thread fanatic
Thank you Marcus for the reply.
let me show you an example of what I did. but so far i am not getting any
output from it

def set_parameters(self,amplitude):
global d_amplitude
 d_amplitude= amplitude
 print d_amplitude

#then  on the contructor
 def_init_(self, amplitude)
   self.set_parameter(amplitude)
   analog_sig_source = analog.sig_source_f(sampling_rate,
analog.GR_TRI_WAVE, f, d_amplitude, 0)
 #then connect the block to other blocks


   



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/python-Hier-block-using-callback-tp53486p53489.html
Sent from the GnuRadio mailing list archive at Nabble.com.

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


[Discuss-gnuradio] Multiple flowgraphs and GUI elements

2015-04-27 Thread Nemanja Savic
Hi all guys,

I am building a gnuradio top block application where I want to have rx and
tx flographs. Something similar to the example provided with gnuradio. I
want to make rx path and tx path, but the example doesn't use "common" way
for making GUI elements. Now, I am a little bit confused. Should GUI
elements be part of rx and tx path while in the top block, I should only
add them using Add or GridAdd methods?

Thanx

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


Re: [Discuss-gnuradio] No scope with gr?

2015-04-27 Thread Marcus Müller
Hi Ralph,
> Usually I do not use those gfx stuff that much, I just stumbled over it when
> firing up my DSD+ flow for DMR radio decoding, then I tried other flows
> using WX GUI Scope Sink, with the same result.
I see... Hm. The point is that most of us is not really deep into the WX
code base, and GNU Radio is planning to move away from WX to QT, and
since I can't reproduce the problem locally, it's going to be very hard
to get you running. It really *is* an odd failure if only the scope is
failing.
I have one more idea: might be something with OpenGL acceleration; WX
always was a bit flakey on that side, but hardware accell for drawing
lines is really helpful... But maybe on modern machines with CPU cycles
to spare, maybe creating  ~/.gnuradio/config.conf with the lines:

[wxgui]
style = nongl

does the trick (hell, if I knew where .gnuradio is on a windows
machine...).

Generally, if your application is "simple enough" to just switch
Generate Options from "WX" to "Qt" and replace a few GUI elements, then
I'd recommend using Qt; it's more modern, and it will stick around
longer. Most features can be configured even at runtime using
"middle-click" on the visualization.

Greetings,
Marcus

On 04/27/2015 09:50 AM, Ralph A. Schmid, dk5ras wrote:
> Hi,
>
>> Hi Ralph,
>>
>> first of all: that's the WX GUI Scope, right?
> Yes.
>  
>>> Where can I start searching for the reason?
>> Do other Instrumentations from the same GUI framework work?
> The WX GUI Waterfall Sink works as always. 
>
> Usually I do not use those gfx stuff that much, I just stumbled over it when
> firing up my DSD+ flow for DMR radio decoding, then I tried other flows
> using WX GUI Scope Sink, with the same result.
>
>> Tough one, but I'd tackle this with a debug build and GDB:
>> http://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsGDB
> Looks complicated to a Windows guy like me, may take some days until I find
> time for such an adventure :)
>
>> Greetings,
>> Marcus
> Ralph.
>


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


Re: [Discuss-gnuradio] python Hier block using callback

2015-04-27 Thread Marcus Müller
Hi Themba,

the interesting point here is where you register your callback. You say
you've included the callback in the .grc file; if that's the case, you
should find it searching for the name of the variable you change using a
slider etc in the python file GRC generates.

Greetings,
Marcus

On 04/27/2015 10:02 AM, fanatic wrote:
> Thank you Marcus for the reply.
> let me show you an example of what I did. but so far i am not getting any
> output from it
>
> def set_parameters(self,amplitude):
>   global d_amplitude
>  d_amplitude= amplitude
>  print d_amplitude
>
> #then  on the contructor
>  def_init_(self, amplitude)
>self.set_parameter(amplitude)
>analog_sig_source = analog.sig_source_f(sampling_rate,
> analog.GR_TRI_WAVE, f, d_amplitude, 0)
>  #then connect the block to other blocks
>
>
>
>
>
>
> --
> View this message in context: 
> http://gnuradio.4.n7.nabble.com/python-Hier-block-using-callback-tp53486p53489.html
> Sent from the GnuRadio mailing list archive at Nabble.com.
>
> ___
> 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] Multiple flowgraphs and GUI elements

2015-04-27 Thread Marcus Müller
Hi Nemanja

On 04/27/2015 01:18 PM, Nemanja Savic wrote:
> Hi all guys,
and girls :)
>
> I am building a gnuradio top block application where I want to have rx
> and tx flographs. Something similar to the example provided with gnuradio.
Which one of the dozens of examples?

Greetings,
Marcus

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


[Discuss-gnuradio] Polyphase Clock Synchronization with Matched Filter

2015-04-27 Thread Su Li
Hi all,

I am trying to use Polyphase Clock Synchronization (PCS) block to conduct
timing synchronization for QPSK signal with half-sine pulse shaping. In the
doxygen document of PCS, it says that the "taps" parameter could be the
matched filter. Thus, I put the matched filter of half-sine pulse here,
[0,sin(pi/4),1,sin(3*pi/4)]. However, the output is all 0.

Is there anyone knows how to generate the "taps" parameter here?  Any
suggestion would be appreciated. Thanks in advance.

Best regards,

Su Li

PS: here is my configuration for other parameters.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Polyphase Clock Synchronization with Matched Filter

2015-04-27 Thread Sylvain Munaut
Hi,

I am trying to use Polyphase Clock Synchronization (PCS) block to conduct
> timing synchronization for QPSK signal with half-sine pulse shaping. In the
> doxygen document of PCS, it says that the "taps" parameter could be the
> matched filter. Thus, I put the matched filter of half-sine pulse here,
> [0,sin(pi/4),1,sin(3*pi/4)]. However, the output is all 0.
>
> Is there anyone knows how to generate the "taps" parameter here?  Any
> suggestion would be appreciated. Thanks in advance.
>

I'm not an expert in all the details, but what I know is that the taps
there need to be generated at "Filter Size" * "Sample Rate".

So I'd try something like [math.sin(math.pi*i/(32*4)) for i in range(32*4)]

Cheers,

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


Re: [Discuss-gnuradio] Polyphase Clock Synchronization with Matched Filter

2015-04-27 Thread Tom Rondeau
On Mon, Apr 27, 2015 at 9:34 AM, Sylvain Munaut <246...@gmail.com> wrote:

> Hi,
>
> I am trying to use Polyphase Clock Synchronization (PCS) block to conduct
>> timing synchronization for QPSK signal with half-sine pulse shaping. In the
>> doxygen document of PCS, it says that the "taps" parameter could be the
>> matched filter. Thus, I put the matched filter of half-sine pulse here,
>> [0,sin(pi/4),1,sin(3*pi/4)]. However, the output is all 0.
>>
>> Is there anyone knows how to generate the "taps" parameter here?  Any
>> suggestion would be appreciated. Thanks in advance.
>>
>
> I'm not an expert in all the details, but what I know is that the taps
> there need to be generated at "Filter Size" * "Sample Rate".
>
> So I'd try something like [math.sin(math.pi*i/(32*4)) for i in range(32*4)]
>
> Cheers,
>
>Sylvain
>


What Sylvain said should work, I believe. But you should study the manual
page on this block:

http://gnuradio.org/doc/doxygen/classgr_1_1digital_1_1pfb__clock__sync__ccf.html

Hopefully understanding the way it works will help you understand why the
taps need to be this way.

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


Re: [Discuss-gnuradio] Polyphase Clock Synchronization with Matched Filter

2015-04-27 Thread Su Li
Hi Sylvain and Tom,

Thanks a lot. It works.

So the "Taps" should contain all the matched filter coefficients for
Filter_Size (32) filters instead of just one filter. Then each filter takes
SPS (4) out of them to generate a phase-shifted shaping filter. Hence, we
have a filterbank with different phases. The optimal sample timing could be
estimated as described in Tutorial 7.

Best regards,

Su Li

2015-04-27 15:58 GMT+02:00 Tom Rondeau :

> On Mon, Apr 27, 2015 at 9:34 AM, Sylvain Munaut <246...@gmail.com> wrote:
>
>> Hi,
>>
>> I am trying to use Polyphase Clock Synchronization (PCS) block to conduct
>>> timing synchronization for QPSK signal with half-sine pulse shaping. In the
>>> doxygen document of PCS, it says that the "taps" parameter could be the
>>> matched filter. Thus, I put the matched filter of half-sine pulse here,
>>> [0,sin(pi/4),1,sin(3*pi/4)]. However, the output is all 0.
>>>
>>> Is there anyone knows how to generate the "taps" parameter here?  Any
>>> suggestion would be appreciated. Thanks in advance.
>>>
>>
>> I'm not an expert in all the details, but what I know is that the taps
>> there need to be generated at "Filter Size" * "Sample Rate".
>>
>> So I'd try something like [math.sin(math.pi*i/(32*4)) for i in
>> range(32*4)]
>>
>> Cheers,
>>
>>Sylvain
>>
>
>
> What Sylvain said should work, I believe. But you should study the manual
> page on this block:
>
>
> http://gnuradio.org/doc/doxygen/classgr_1_1digital_1_1pfb__clock__sync__ccf.html
>
> Hopefully understanding the way it works will help you understand why the
> taps need to be this way.
>
> Tom
>
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Multiple flowgraphs and GUI elements

2015-04-27 Thread Nemanja Savic
The one suggested for multiple flowgraphs in the gnuradio page Writing
python applications. Walkie talkie nbfm example (can't provide the name at
the moment).

Best,
Nemanja

On Mon, Apr 27, 2015 at 2:23 PM, Marcus Müller 
wrote:

> Hi Nemanja
>
> On 04/27/2015 01:18 PM, Nemanja Savic wrote:
> > Hi all guys,
> and girls :)
> >
> > I am building a gnuradio top block application where I want to have rx
> > and tx flographs. Something similar to the example provided with
> gnuradio.
> Which one of the dozens of examples?
>
> Greetings,
> Marcus
>
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>



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


Re: [Discuss-gnuradio] Multiple flowgraphs and GUI elements

2015-04-27 Thread Marcus Müller
So you mean this one:
http://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsWritePythonApplications#Multiple-flow-graphs


That refers to the Push-to-talk example from gr-uhd, which is a bit
older, I think.
However, the whole point is that you can simply write your TX flow graph
and your RX flow graph as hierarchical blocks of their own, for example
graphically using GRC, or like in that Tutorial in python. Then you just
use these hier_block2 's in your "overall flow graph".

The graphical sinks must be placed at the point where the samples flow
that you want to visualize, hence I don't understand that part of the
question; I do think you're on to something, so could you please elaborate?

Best regards,
Marcus

On 04/27/2015 05:07 PM, Nemanja Savic wrote:
> The one suggested for multiple flowgraphs in the gnuradio page Writing
> python applications. Walkie talkie nbfm example (can't provide the
> name at the moment).
>
> Best,
> Nemanja
>
> On Mon, Apr 27, 2015 at 2:23 PM, Marcus Müller
> mailto:marcus.muel...@ettus.com>> wrote:
>
> Hi Nemanja
>
> On 04/27/2015 01:18 PM, Nemanja Savic wrote:
> > Hi all guys,
> and girls :)
> >
> > I am building a gnuradio top block application where I want to
> have rx
> > and tx flographs. Something similar to the example provided with
> gnuradio.
> Which one of the dozens of examples?
>
> Greetings,
> Marcus
>
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org 
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
>
>
> -- 
> Nemanja Savić

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


Re: [Discuss-gnuradio] Multiple flowgraphs and GUI elements

2015-04-27 Thread Marcus Müller
Ok, this boils down to one thing:

The flow graph you're doing doesn't really have logically "separate" RX
and TX parts.
Just put it all in one big GRC file and you should be set; do you
encounter any problems when doing that?

Greetings,
Marcus
On 04/27/2015 06:25 PM, Nemanja Savic wrote:
> Hi,
>
> Yes, I think of that example, wihch could be found in
> gr-uhd/examples/python/usrp_nbfm_ptt.py
> The problem that I don't uderstand is how to cope with GUI elements
> like WX GUI FFT. It should be connected with other elemetns inside
> hier block, but also to be added into the grid of top block. So my
> question was about how to make that. After I instantiate them and
> connect inside hierblock, should I only call GridAdd() method from the
> topo block?
>
> Thanx a lot
> Nemanja
>
> On Mon, Apr 27, 2015 at 5:40 PM, Marcus Müller
> mailto:marcus.muel...@ettus.com>> wrote:
>
> So you mean this one:
> 
> http://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsWritePythonApplications#Multiple-flow-graphs
>
>
> That refers to the Push-to-talk example from gr-uhd, which is a
> bit older, I think.
> However, the whole point is that you can simply write your TX flow
> graph and your RX flow graph as hierarchical blocks of their own,
> for example graphically using GRC, or like in that Tutorial in
> python. Then you just use these hier_block2 's in your "overall
> flow graph".
>
> The graphical sinks must be placed at the point where the samples
> flow that you want to visualize, hence I don't understand that
> part of the question; I do think you're on to something, so could
> you please elaborate?
>
> Best regards,
> Marcus
>
>
> On 04/27/2015 05:07 PM, Nemanja Savic wrote:
>> The one suggested for multiple flowgraphs in the gnuradio page
>> Writing python applications. Walkie talkie nbfm example (can't
>> provide the name at the moment).
>>
>> Best,
>> Nemanja
>>
>> On Mon, Apr 27, 2015 at 2:23 PM, Marcus Müller
>> mailto:marcus.muel...@ettus.com>> wrote:
>>
>> Hi Nemanja
>>
>> On 04/27/2015 01:18 PM, Nemanja Savic wrote:
>> > Hi all guys,
>> and girls :)
>> >
>> > I am building a gnuradio top block application where I want
>> to have rx
>> > and tx flographs. Something similar to the example provided
>> with gnuradio.
>> Which one of the dozens of examples?
>>
>> Greetings,
>> Marcus
>>
>> ___
>> Discuss-gnuradio mailing list
>> Discuss-gnuradio@gnu.org 
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>
>>
>>
>>
>> -- 
>> Nemanja Savić
>
>
>
>
> -- 
> Nemanja Savić

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


Re: [Discuss-gnuradio] python Hier block using callback

2015-04-27 Thread Marcus Müller
the point is that if the print is not appearing, then the callback isn't
working as you expect. You should really make sure to use the right
variable names.
You're not really sharing all the interesting information; it's a bit
hard to figure this out in what's becoming a dialogue.
I'd like to ask you to read
http://gnuradio.org/redmine/projects/gnuradio/wiki/ReportingErrors

Best regards,
Marcus

On 04/27/2015 09:54 PM, fanatic wrote:
> the callback is on the .xml file from the grc folder, the parameters are
> changing but the waveform is not updating.
> on the other hand, all my custom blocks i get  "AttributeError:
> 'top_block_sptr' object has no attribute 'top_layout'".
>
> it was working all along but I just got that recently, I searched the forum
> I havent found where there is a solution to this :(
>
>
>
> --
> View this message in context: 
> http://gnuradio.4.n7.nabble.com/python-Hier-block-using-callback-tp53486p53501.html
> Sent from the GnuRadio mailing list archive at Nabble.com.
>
> ___
> 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] python Hier block using callback

2015-04-27 Thread fanatic
the callback is on the .xml file from the grc folder, the parameters are
changing but the waveform is not updating.
on the other hand, all my custom blocks i get  "AttributeError:
'top_block_sptr' object has no attribute 'top_layout'".

it was working all along but I just got that recently, I searched the forum
I havent found where there is a solution to this :(



--
View this message in context: 
http://gnuradio.4.n7.nabble.com/python-Hier-block-using-callback-tp53486p53501.html
Sent from the GnuRadio mailing list archive at Nabble.com.

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


[Discuss-gnuradio] Confirming uhd.set_command_time is working

2015-04-27 Thread Anderson, Douglas J.
Hi all,

I'm playing around with timed commands on the USRP, but I'm not sure I 
understand them correctly.

I've got a usrp connected as "u" and set to center freq 700e6.

>>> u.set_command_time(u.get_time_now() + uhd.time_spec(2)); 
>>> u.set_center_freq(800e6); u.clear_command_time(); 
>>> print(u.get_center_freq()); time.sleep(2); print(u.get_center_freq())
-- Successfully tuned to 800.00 MHz
--
 >
8.0
[... 2 second pause is here ...]
8.0

It looks like it's changing the freq immediately... but I'm assuming as usual 
there's more than meets the eye to this command. Any hints?

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


Re: [Discuss-gnuradio] Confirming uhd.set_command_time is working

2015-04-27 Thread Martin Braun
Which USRP is this?

M

On 27.04.2015 15:03, Anderson, Douglas J. wrote:
> Hi all,
> 
> I'm playing around with timed commands on the USRP, but I'm not sure I
> understand them correctly.
> 
> I've got a usrp connected as "u" and set to center freq 700e6.
> 
 u.set_command_time(u.get_time_now() + uhd.time_spec(2));
> u.set_center_freq(800e6); u.clear_command_time();
> print(u.get_center_freq()); time.sleep(2); print(u.get_center_freq())
> -- Successfully tuned to 800.00 MHz
> -- 
>  '::uhd::tune_result_t *' at 0x7f1b75a3b930> >
> 8.0
> [... 2 second pause is here ...]
> 8.0
> 
> It looks like it's changing the freq immediately... but I'm assuming as
> usual there's more than meets the eye to this command. Any hints?
> 
> -Doug
> 
> 
> ___
> 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


[Discuss-gnuradio] Is it possible to undo my mistake

2015-04-27 Thread Carl Olsson
Dear all,

I followed a tutorial online to install a sdr software and accidentaly
deleted files from my gnuradio installation. It took me a very long time to
manage to set up everyting so before I start from the beginning I wanted to
ask you if it is possible to undo my mistake. I am on Ubuntu 14.04 LTS and
did:
cd user/local/lib
sudo rm libgnuradio*

Now when I run gnuradio-companion I get:

*Cannot import gnuradio.*

*Is the python path environment variable set correctly?*
*All OS: PYTHONPATH*

*Is the library path environment variable set correctly?*
*Linux: LD_LIBRARY_PATH*
*Windows: PATH*
*MacOSX: DYLD_LIBRARY_PATH*

Thank you all!
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Correlation Estimation Block Oddity

2015-04-27 Thread Richard Bell
Andy and all,

Sorry for the delay in reply, I've been working hard to figure things out
on my end.

I use the polyphase clock recovery block for timing recovery.

I have essentially copied the test_corr_est.grc example that was included
with the block in the examples directory. It seems that this might not be
the appropriate way to use this block. Here is why I say this. If you look
at the attached screenshot, you will see the correlation output has two
peaks, somewhat close in amplitude to each other. The synchronization
sequence that was used to generate those peaks was 64 bits long and
composed of two 32 bit long PN sequences repeated. Therefore, one would
expect the output of the correlation to generate 3 peaks, a center peak
that is ~64 units high, and two side peaks spaced 32 samples apart that are
~32 units high.

Now, I believe the cause of this to be the use of the modulate vector block
to generate the input mask for the correlation estimation block. I have
attached a second screenshot of the output of the modulation vector block.
You will see in this screen shot a large transient portion that is fed into
the correlation estimation block. So, if we agree we should not use the
modulate vector block to feed the correlation estimation block with its
mask, then the question is how should I? An example what be most helpful.

This is difficult to discuss because things get wordy very quickly. Let me
know if I can make anything more clear.

v/r,
Rich

On Fri, Apr 24, 2015 at 9:11 AM, Andy Walls 
wrote:

> Hi Richard,
>
> >  From:
> > Richard Bell
> >   Subject:
> > Re: [Discuss-gnuradio] Correlation
> > Estimation Block Oddity
> >  Date:
> > Thu, 23 Apr 2015 15:38:38 -0700
> >
> > __
> > I have another question on tag placement for the correlation
> > estimation block. In the screenshot I've attached, you'll see that the
> > corr_start tag is placed well before the preamble actually starts.
>
> OK.  That's the first thing you should try to fix.  You are crossing the
> correlation threshold too early.
>
> Either
>
> a. Get rid of leading 0's in the correlation sequence that you are
> using,
> b. Set the threshold on the corr_est block to something higher than the
> default 0.9 (90%), or
> c. make the correlation sequence "more unique" somehow, e.g. make it
> longer.
>
> As I mentioned in my previous email, the "corr_start" tags is placed at
> the length of your matched filter samples before where the correlation
> peak was detected.
>
> You can eyeball how the correlation is going by plotting the Magnitude^2
> of the "corr" output on top of the output signal (use a tag_gate block
> to block the tags coming out of the "corr" output).  The output signal
> is delayed by the length of the matched filter, so you can see the
> correlation peak and the "corr_start" tag line up.
>
> See the attached screen shot of an AIS preamble and the scaled magnitude
> squared of the correlator output.
>
>
> >  If I use the 'delay tag' field to move it to the end of the preamble
> > where I need it, it stops delaying, no matter how big I make the
> > delay,
>
> Yup, the code forces a maximum delay.  You can delay it to the end of
> your matched filter and no further:
>
> https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/corr_est_cc_impl.cc#L65
>
> The code does this because GnuRadio will not let us tag samples outside
> of the window of samples passed to the current call to work.  By setting
> the bound of the marking delay to the start and end of the matched
> filter, with other mechanisms in the block, we are guaranteed to be able
> to mark the sample.
>
> >  before it reaches the end of the preamble.
>
> Well as far as the block is concerned, you are able to mark to the end
> of the matched filter where the correlation peak occurred (but no
> further), which should be the end of your preamble.  Your problem is
> that the block declared a correlation too early.
>
>
> >  This is shown in the picture. I need this tag to denote the start of
> > the header for the Header Payload Demux block.
>
> Out of curiosity, what's doing timing recovery, i.e. finding the optimal
> bit sampling times?  I use the tagging delay out of the corr_est block
> to mark the center of the first bit in the preamble, to tell downstream
> bit timing recovery blocks to reset/realign at that point.
>
> Regards,
> Andy
>
> >
> > My question is, given the situation in the screenshot, is there a way
> > I can delay just the tag in grc using a block? I'm not sure how to get
> > the tag positioned where I need it at this point.
> >
> >
> > Help is greatly appreciated
> >
> >
> > v/r,
> >
> > Rich
> >
> >
> >
>
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Correlation Estimation Block Oddity

2015-04-27 Thread Richard Bell
I somehow attached the wrong correlation screenshot in my previous post.
Here is the correct one.

Rich

On Mon, Apr 27, 2015 at 4:35 PM, Richard Bell 
wrote:

> Andy and all,
>
> Sorry for the delay in reply, I've been working hard to figure things out
> on my end.
>
> I use the polyphase clock recovery block for timing recovery.
>
> I have essentially copied the test_corr_est.grc example that was included
> with the block in the examples directory. It seems that this might not be
> the appropriate way to use this block. Here is why I say this. If you look
> at the attached screenshot, you will see the correlation output has two
> peaks, somewhat close in amplitude to each other. The synchronization
> sequence that was used to generate those peaks was 64 bits long and
> composed of two 32 bit long PN sequences repeated. Therefore, one would
> expect the output of the correlation to generate 3 peaks, a center peak
> that is ~64 units high, and two side peaks spaced 32 samples apart that are
> ~32 units high.
>
> Now, I believe the cause of this to be the use of the modulate vector
> block to generate the input mask for the correlation estimation block. I
> have attached a second screenshot of the output of the modulation vector
> block. You will see in this screen shot a large transient portion that is
> fed into the correlation estimation block. So, if we agree we should not
> use the modulate vector block to feed the correlation estimation block with
> its mask, then the question is how should I? An example what be most
> helpful.
>
> This is difficult to discuss because things get wordy very quickly. Let me
> know if I can make anything more clear.
>
> v/r,
> Rich
>
> On Fri, Apr 24, 2015 at 9:11 AM, Andy Walls 
> wrote:
>
>> Hi Richard,
>>
>> >  From:
>> > Richard Bell
>> >   Subject:
>> > Re: [Discuss-gnuradio] Correlation
>> > Estimation Block Oddity
>> >  Date:
>> > Thu, 23 Apr 2015 15:38:38 -0700
>> >
>> > __
>> > I have another question on tag placement for the correlation
>> > estimation block. In the screenshot I've attached, you'll see that the
>> > corr_start tag is placed well before the preamble actually starts.
>>
>> OK.  That's the first thing you should try to fix.  You are crossing the
>> correlation threshold too early.
>>
>> Either
>>
>> a. Get rid of leading 0's in the correlation sequence that you are
>> using,
>> b. Set the threshold on the corr_est block to something higher than the
>> default 0.9 (90%), or
>> c. make the correlation sequence "more unique" somehow, e.g. make it
>> longer.
>>
>> As I mentioned in my previous email, the "corr_start" tags is placed at
>> the length of your matched filter samples before where the correlation
>> peak was detected.
>>
>> You can eyeball how the correlation is going by plotting the Magnitude^2
>> of the "corr" output on top of the output signal (use a tag_gate block
>> to block the tags coming out of the "corr" output).  The output signal
>> is delayed by the length of the matched filter, so you can see the
>> correlation peak and the "corr_start" tag line up.
>>
>> See the attached screen shot of an AIS preamble and the scaled magnitude
>> squared of the correlator output.
>>
>>
>> >  If I use the 'delay tag' field to move it to the end of the preamble
>> > where I need it, it stops delaying, no matter how big I make the
>> > delay,
>>
>> Yup, the code forces a maximum delay.  You can delay it to the end of
>> your matched filter and no further:
>>
>> https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/corr_est_cc_impl.cc#L65
>>
>> The code does this because GnuRadio will not let us tag samples outside
>> of the window of samples passed to the current call to work.  By setting
>> the bound of the marking delay to the start and end of the matched
>> filter, with other mechanisms in the block, we are guaranteed to be able
>> to mark the sample.
>>
>> >  before it reaches the end of the preamble.
>>
>> Well as far as the block is concerned, you are able to mark to the end
>> of the matched filter where the correlation peak occurred (but no
>> further), which should be the end of your preamble.  Your problem is
>> that the block declared a correlation too early.
>>
>>
>> >  This is shown in the picture. I need this tag to denote the start of
>> > the header for the Header Payload Demux block.
>>
>> Out of curiosity, what's doing timing recovery, i.e. finding the optimal
>> bit sampling times?  I use the tagging delay out of the corr_est block
>> to mark the center of the first bit in the preamble, to tell downstream
>> bit timing recovery blocks to reset/realign at that point.
>>
>> Regards,
>> Andy
>>
>> >
>> > My question is, given the situation in the screenshot, is there a way
>> > I can delay just the tag in grc using a block? I'm not sure how to get
>> > the tag positioned where

Re: [Discuss-gnuradio] Is it possible to undo my mistake

2015-04-27 Thread Richard Bell
Probably not without knowing exactly what was accidentally deleted.

What process do you use to install gnuradio that is so difficult to start
over with? What OS?

On Ubuntu 14.04 using pybombs, it takes me about 35 minutes to completely
wipe gnuradio from my machine to having it fully installed again. This
should be possible for you too, assuming a standard setup.

v/r,
Rich

On Mon, Apr 27, 2015 at 4:41 PM, Carl Olsson 
wrote:

> Dear all,
>
> I followed a tutorial online to install a sdr software and accidentaly
> deleted files from my gnuradio installation. It took me a very long time to
> manage to set up everyting so before I start from the beginning I wanted to
> ask you if it is possible to undo my mistake. I am on Ubuntu 14.04 LTS and
> did:
> cd user/local/lib
> sudo rm libgnuradio*
>
> Now when I run gnuradio-companion I get:
>
> *Cannot import gnuradio.*
>
> *Is the python path environment variable set correctly?*
> *All OS: PYTHONPATH*
>
> *Is the library path environment variable set correctly?*
> *Linux: LD_LIBRARY_PATH*
> *Windows: PATH*
> *MacOSX: DYLD_LIBRARY_PATH*
>
> Thank you all!
>
> ___
> 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