Shop OBEX P1 Docs P2 Docs Learn Events
Understanding "DDS/Goertzel LUT mode" — Parallax Forums

Understanding "DDS/Goertzel LUT mode"

Reading through the documentation, I'm not connecting a couple of the dots. The document indicates that an input pin (which should be configured as an ADC input) is sampled on every clock. What happens to that sampled bit? And how does this relate to the NCO, which is used to read the LUT? Additionally, the current document seems mostly focused on processing inputs. How would I use this for just DDS output?

Comments

  • cgraceycgracey Posts: 14,133
    For DDS, ignore the matter of the ADC input pin.
  • But what about the other part... how do you go from sampling the pin to reading from the LUT?
  • cgraceycgracey Posts: 14,133
    edited 2015-11-30 19:46
    The LUT serves dual purposes during Goertzel.

    All four bytes (a long) read from the LUT are written to the DACs, according to %dddd. Practically, you would only enable the bottom one or two DACs for output. The upper two bytes from the LUT are multiplied by the ADC input, such that 0/1 is treated as -1/+1, and the separate products are accumulated into X and Y registers, readable via GETXCOS/GETXSIN. These sums of products, after NCO rollovers, form (X,Y) coordinates, which can be converted to polar coordinates via the QVECTOR instruction, so that you get power and phase measurements, representing the ADC bit stream's correlation to sine/cosine patterns in the top two LUT bytes.

    This will require some special example code to demonstrate.

    You can do three things with the DDS/Goertzel mode:

    1) Generate DDS waveform(s), ignore Goertzel.
    2) Generate DDS waveform(s) and track same-frequency/phase input using Goertzel.
    3) No DDS, but use the Goertzel mode to measure energy of a frequency within a noisy signal.
  • ErNaErNa Posts: 1,742
    I just found some information about phase utilisation in image detection: http://www.ecnmag.com/news/2015/12/making-3-d-imaging-1000-times-better That could be an application for the P2, using the vector rotation features, MAC and parallel processing abilities
  • evanhevanh Posts: 15,187
    edited 2015-12-02 21:35
    Article wrote:
    On its own, at a distance of several meters, the Kinect can resolve physical features as small as a centimeter or so across. But with the addition of the polarization information, the researchers' system could resolve features in the range of hundreds of micrometers, or one-thousandth the size.

    Hmm, maybe a little vague/deceptive ... hundreds of microns, plural, could mean one millimetre. So that's 10x by 10y by 10z = 1000.

  • Isn't that how "size" works though?

  • evanhevanh Posts: 15,187
    For volume, sure, but they vague on that one too. "Better" in this case seems to imply surface detail which could be construed as an area at best, but even here I'd still be thinking in terms of singular linear detail because the subject matter is not about volumes or even areas.
  • ErNaErNa Posts: 1,742
    While it is interesting to find out, how marketing creates 1000 from 3 (without knowledge about the power of numbers in a mathematical sense) I wanted to point to the fact, that phase contains information, normally thrown away by calculating the power. What we see here might be related to a hologramm. I didn't study the paper, but I remember Chips video (long ago) when he demonstrated how interesting it might be to have a goertzel processor, painting with his finger a rotating wave to the space in front of him ;-) (He had to stop when his arm was fully stretched )
  • ErNaErNa Posts: 1,742
    edited 2015-12-03 11:20
    I was looking to find the paper published, here is the link: web.media.mit.edu/~achoo/polar3D/Kadambi_polar3D.pdf
  • rjo__rjo__ Posts: 2,114
    edited 2015-12-03 18:35
    Very interesting conversation. I looked through the paper a little. It is worth reading. The point of this research is to demonstrate that TOF data, such as that which comes from the Kinect V2, can be used to constrain general problems in the use of polarization statistics to determine 3D shape... problems which are many and varied:) It also mentions other (probably more successful:) approaches to using TOF data to constrain general problems in the use of other strategies for making 3D measurement.

    The basic idea is to use TOF data to limit general problems with existing techniques and theory. This particular work is well expressed theoretically(except for treating ambient light as invariant and unpolarized:)

    quote from techniques section: "Scenes are assumed to have the following properties: (1) unpolarized ambient light; (2) no specular interreflections; (3) only dielectric materials or low-frequency changes in materials; and (4) diffuse-dominant or specular-dominant surfaces."

    So, if you assume something to be true that is generally not true... you have an up-hill battle to prove that your approach is generally important This work IS generally important, and this paper is a very good reference. But all of that gets lost in the actual experiments, which seem a bit rushed (which is understandable because the basis of the paper is thesis oriented, which always seems a little rushed.)

    If I were criticizing the thesis, I would point out that no effort(at least none that I could quickly find) was made to eliminate known sources of noise from the TOF data, which at a minimum can be done on a pixel by pixel basis by thresholds, based on variance in the first order differentials coming directly from sequential TOF data. The thesis also makes the assertion that valid polarization statistics can be acquired from three acquisitions per point. The choice to limit the acquisition data to three measurements per set seems to me to be a convenience and stating this as a theoretical limit has nothing to do with real world problems.

    I think it is true that polarization statistics with the same spatial limits of the TOF device can be used to eliminate noise in TOF data... but what is not true is that it can improve the resolution of valid TOF data, which is limited primarily by the angular resolution and time slicing of the TOF device.

    What is true is that if the polarizing statistics come from a separate sensor, with much higher spatial resolution than the TOF device, then it is possible that the TOF data could be used to improve the 3D data coming from the polarization statistics to the point that it exceeds the resolution of the TOF data... under laboratory conditions. This is important, but how important it actually is depends upon a valid comparison with other techniques to use TOF data as a constraint for other 3D techniques.

    I have absolutely no idea what Chip is doing with Goertzel:) Except that I looks like it would allow these guys to get their data in real time from analog cameras:) That's a joke... it might be true, but it is still just a joke.


  • rjo__rjo__ Posts: 2,114
    This is a screenshot from Propeller2Explorer... a Processing.org serial interface/application stub, which also includes support for Kinect V2 and a camera... all you need to do these experiments for yourself.

    In the screenshot you see colorized depth data... with one scan line selected (139).
    If you look carefully, the little blue dots represent the first order differentials from the most recent acquisition. Currently, the depth data is kept in a buffer, which contains the last five acquisitions.

    What is most important is that this is all being run on a Kangaroo $99 64 bit Windows 10 machine (that jmg pointed me to) that weighs nothing and is smaller than the P123 board. In addition to this application, it can simultaneously run ImageJ, which can cycle through 6+ additional cameras... additional cost of about $50... and also has a serial link available.
    1920 x 1080 - 269K
Sign In or Register to comment.