[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Loops in graphs? Do we need them?
From: |
Thomas Traber |
Subject: |
Re: [Discuss-gnuradio] Loops in graphs? Do we need them? |
Date: |
Tue, 8 Feb 2005 22:27:40 +0100 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
Hi Achilleas,
> The reason (imho) of the existence of PLLs (and similar non-linear
> feedback loops) is that in old analog systems, such an option was not
> there (ie, taking the arctan of a signal).
Maybe you are right and I am thinking to much in hardware.
It might be that almost all digital signal processing task
can be done without feedback.
Loops which cover only few blocks are better hard coded in
C.
BTW: There are files like GrAGC.h, GrCostasLoop.h and
GrComplexVCOMixer.h in src/lib/general. I do not know how
they are used.
In spite of Erics explanation of the buffer problem I tried
to realize a feedback in python. The PLL didn't work well.
Maybe this thing is usefull for other very low frequency
feedbacks.
-------------------------------------------------------
class feedback_device(threading.Thread):
"""
Input to the device is via pipe
Output is the function in feedback
to call with the output value.
e.g. set_frequency
"""
def __init__(self,feedback):
threading.Thread.__init__(self)
self.feedback=feedback
self.rfd,self.wfd = os.pipe()
self.setDaemon(1)
self.keep_running=True
self.start()
def input (self):
return
gr.file_descriptor_sink(gr.sizeof_float,self.wfd)
def run (self):
while (self.keep_running):
s=os.read(self.rfd, gr.sizeof_float)
v=struct.unpack("f",s)
self.feedback(v[0])