Phase locked loop

Hi, Currently I am doing my Final Year Project to develop a phase
measurement using Phase Locked Loop theory. I am using USRP N210 for the
hardware and I have installed Gnuradio Companion in Ubuntu 12.04
LTS (running in VMplayer). I have studied online that I can’t use
companion to add and drop the current available blocks to construct a
phase locked loop. I managed to locate gr_pll_carriertracking_cc.cc and
gr_pll_carriertracking_cc.h file from gnuradio source archive. I also
know that I can use gr_modtool to construct my own OOT module. But I am
having some difficulties in using gr_modtool. There are many functions
is the gr_pll_carriertracking_cc.cc.

My question are

(a) What should I include for the valid argument list during the
gr_modtool add process?
reference link
: http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorial_GNU_Radio_in_C++#432-Specific-block-categories (4.2.3
Step 2)

(b) Am I putting the whole code (gr_pll_carriertracking_cc.cc) and
generate it as ONE OOT module with few functions inside or should I
separate the functions to become more OOT module and connect them using
wire in companion?

© How can I include all the header file into the make process?
There are few header files being used in the code such as
gr_io_signature.h , gr_sincos.h….

I would really appreciate your help in guiding me.

Thank you very much.

Best regards,

Wai Yee.

On 16.03.2015 18:05, yee_yy1992 wrote:

My question are

(a)What should I include for the valid argument list during the
gr_modtool add process?
reference link :

http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorial_GNU_Radio_in_C++#432-Specific-block-categories
(4.2.3

Step 2)

This depends what you want to achieve. Use gr_modtool help add for more
advice.

(b)Am I putting the whole code (gr_pll_carriertracking_cc.cc
http://cc.cc/) and generate it as ONE OOT module with few functions
inside or should I separate the functions to become more OOT module and
connect them using wire in companion?

More modular is usually better.

©How can I include all the header file into the make process? There
are few header files being used in the code such as gr_io_signature.h ,
gr_sincos.h.

How good is your C++? Maybe it’s worth brushing up the basics first, or
perhaps you might consider writing the block in Python.
Also, I recommend looking at some of the blocks in GNU Radio as
examples. I didn’t fully understand what your objective is, but there
are PLL blocks which you can have a look at for input.

Cheers,
M

Hi Daniele,

Also, I don’t see why you cannot combine other blocks to realize
your own PLL implementation. Where did you read that you “cant use
companion to add and drop the current available blocks to construct a
phase locked loop”?
Wai Yee has a point here – you can’t have a circle in your (sample
stream) flow graph – GNU Radio doesn’t allow that for reasons of
causality.

You can have a “loose” loop with feedback done with message ports, but
that’s not the same as a control loop (since there’s no defined delay
between the sample for which a error was estimated and the sample where
the error correction is applied when using the asynchronous messages).

Thus, you can’t drag’n’drop together a “proper” control loop from
discrete things like adders and integrators that you could design and
analyze theoretically.

In effect, GNU Radio’s control loops are monolithic blocks – that’s
somewhat sad from a modularity perspective, but then again, there’s the
control loop base class that allows you to implement arbitrary control
loops rather easily, so Wai Yee, I recommend looking at the
documentation [1], the referenced paper and the source code[2] of the
existing costas loop.

Best regards,
Marcus M.

PS:

I am using USRP N210 for the hardware and I have installed Gnuradio
Companion
in Ubuntu 12.04 LTS (running in VMplayer).
as a side note, I don’t recommend running your digital signal processing
for a high-rate capable device inside a VM, unless you know what you’re
doing – the additional overhead in network packet handling might prove
to be a problem. At lower rates, it should work fine.
Also, why are you using a three years old Ubuntu? There’s a new LTS
release, almost a year old now, 14.04; I recommend using a modern
platform.

[1]
http://gnuradio.org/doc/doxygen/classgr_1_1digital_1_1costas__loop__cc.html
[2]
https://github.com/gnuradio/gnuradio/blob/master/gr-digital/lib/costas_loop_cc_impl.cc

On 17/03/15 02:05, yee_yy1992 wrote:

Hi, Currently I am doing my Final Year Project to develop a phase
measurement using Phase Locked Loop theory. I am using USRP N210 for
the hardware and I have installed Gnuradio Companion in Ubuntu 12.04
LTS
(running in VMplayer). I have studied online that I cant use
companion to add and drop the current available blocks to construct a
phase locked loop.

Hello,

what to you mean by that last sentence? GNURadio comes with PLL blocks
in a few different fashions that can be used from the companion just
fine. Also, I don’t see why you cannot combine other blocks to realize
your own PLL implementation. Where did you read that you “cant use
companion to add and drop the current available blocks to construct a
phase locked loop”?

Cheers,
Daniele

Hi Daniele,

On 03/17/2015 03:38 PM, Daniele N. wrote:

I realized this while having my coffee this morning. I should avoid to
reply to emails before assuming the right amount of caffeine :slight_smile:
oh… I know that feeling!

In effect, GNU Radio’s control loops are monolithic blocks – that’s
somewhat sad from a modularity perspective, but then again, there’s the
control loop base class that allows you to implement arbitrary control
loops rather easily
Last time I looked into it, this base class is not that generic: it can
be easily used to implement phase-lock loops, but it did not seem
designed to control other quantities, like amplitude for example. But I
may have had a too quick loot at it.
I’d have to admit, you’re right. I’m not quite sure, but I think Wai Yee
really just wants a PLL – so that would be fine.

Greetings,
Marcus

On 17/03/15 15:08, Marcus M. wrote:

You can have a “loose” loop with feedback done with message ports, but
that’s not the same as a control loop (since there’s no defined delay
between the sample for which a error was estimated and the sample where
the error correction is applied when using the asynchronous messages).

Thus, you can’t drag’n’drop together a “proper” control loop from
discrete things like adders and integrators that you could design and
analyze theoretically.

Hello Marcus,

I realized this while having my coffee this morning. I should avoid to
reply to emails before assuming the right amount of caffeine :slight_smile:

In effect, GNU Radio’s control loops are monolithic blocks – that’s
somewhat sad from a modularity perspective, but then again, there’s the
control loop base class that allows you to implement arbitrary control
loops rather easily

Last time I looked into it, this base class is not that generic: it can
be easily used to implement phase-lock loops, but it did not seem
designed to control other quantities, like amplitude for example. But I
may have had a too quick loot at it.

Cheers,
Daniele

Hi Yee,

Oh I did forget to put the link of the book, sorry!!! Here is the book:

http://www.amazon.com/Digital-Communications-A-Discrete-Time-Approach/dp/0130304972

If you want to implement a PLL by yourself, I prefer to see an example
of
QPSK Tx/Rx in Matlab:

http://www.mathworks.com/help/comm/examples/qpsk-transmitter-and-receiver.html

However, it’s convenient to use available blocks in GNURadio.

Best,
Mostafa

On Wed, Mar 18, 2015 at 4:11 AM, yee_yy1992 [email protected]
wrote:

If you want to have a loop within GNURadio, you must have a delay within

gr_pll_carriertracking_cc.h file from gnuradio source archive. I also know
Step 2)

[email protected]
Amirkabir University Of Technology
Tehran
IRAN
Tel: +98 (919) 158-7730
LAB: http://ele.aut.ac.ir/~mmwcl/?page_id=411
Homepage: http://ele.aut.ac.ir/~alizadeh/



Department of Electrical Engineering
Aboureyhan Building
MMWCL LAB
Amirkabir University Of Technology
Tehran
IRAN
Tel: +98 (919) 158-7730
LAB: http://ele.aut.ac.ir/~mmwcl/?page_id=411
Homepage: http://ele.aut.ac.ir/~alizadeh/


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs