SourceForge has been redesigned. Learn more.
Close

MK3-Pro/A810-PLL + GXSM

Developers
Percy Zahl
2012-04-11
2012-12-06
  • Percy Zahl

    Percy Zahl - 2012-04-11

    Update in the PLL embedding into Gxsm:

    • DSP PAC lib (PLL support) for Mk3-Pro is now hooked into the DSP SPM code for GXSM (MK3)
    • new life adjustable "PAC-channel" and generic ADC channel mapping as FB-MIXER-CH2/3/4 inputs
    • PAC-channel incl. any ADC channel set for MIXER-CH2/3/4 are now mapped as new data input channels and can be configured via preferences at "DataAq/PIDSrcA2/3/4". Set to ZType to FLOAT. Name as you like or just "PAC1/2/3". Select Unit you intend to use/map later. This is up to you to get right.
    • The FB Mixer now offers a pull down menu to select the source. You can even life change while scanning... but beware if the mixer channel is NOT set to OFF -- then the feedback will do what ever this means...
    • PAC DSP Control window is under development.... -- not yet fully functional.
     
  • Percy Zahl

    Percy Zahl - 2012-05-08

    PAC/PLL GUI is now pretty much completed including the new PACscope tool to do
    tuning, step response checks and generic signal monitoring (scope function).

    Need volunteers to testing in real world!

    Need a Gxsm guru to help documenting Gxsm specific new features...

     
  • Lifeng Hao

    Lifeng Hao - 2012-10-16

    Hi Percy,

    Where can I find the PACscope tool? I tried SR-DSP PAC/tuning, but got no response by click "execute tune".

    Thanks,

    Lifeng

     
  • Thorsten Wagner

    Thorsten Wagner - 2012-10-16

    Hi Lifeng.

    You can access the code via

    http://sranger.cvs.sourceforge.net/viewvc/sranger/SRanger/PAC-scope/

    or check it out via CVS with the module set to SRanger/PAC-scope.

    There should be a readme for the details of the installation. The latest Ubuntu distribution from ventiotec should contain the tool (Ubuntu 12.04 LTS).

    About using it as PLL -- Tuning tool
    ./PACscope -t -S 20 -D 50

    Or as generic scope (mk3)
    ./PACscope -s -a 0 -b 2 -N 5000
    (mk2 and gxsm running)
    ./PACscope -s -N 25000

    for further help and parameters
    ./PACscope --help

    Thorsten :-)

     
  • Lifeng Hao

    Lifeng Hao - 2012-10-17

    Hi Thorsten,

    I just installed PACscope and made some test with resonator_32k provided by SoftdB. The M/PLL(8) output and PLL-5 input were monitored by an external oscilloscope. By running ./PACscope -t -S 20 -D 50, it is found that both the Amp and the Phase stayed at zero without fluctuation, as shown in the attachment. From the oscilloscope, there was sin wave output from M/PLL(8) and the input to PLL-5 can reach a maximum during freq scan. It seems the system is actually tuning. Is there something I missed?

    Thanks,

    Lifeng

     
    • Lifeng Hao

      Lifeng Hao - 2012-10-21

      Ignore this post please, I do not click "PAC processing".

       
  • Lifeng Hao

    Lifeng Hao - 2012-10-20

    Hi Percy and Thorsten,

    Sorry for bothering again. I got some problems about setting the feedback parameters for driving tuning fork. From the pulldown manual of FB-mixer-Ch2, I choosed "PAC:Exec-Freq LP(Filter64Out) and filled in parameters as attached, then started approaching. The tip crashed into sample, and the frequency shift passed the setting point. I also tried other Mixer-channels and difference combination of setpoint and gain, but seemed no difference. Can you do me a favor to check what is the problem?

    Thanks,

    Lifeng

     
  • Lifeng Hao

    Lifeng Hao - 2012-10-21

    Hi Percy and Thorsten,

    I am still suffering from the feedback problem with PAC channels as input. It seems the feedback loop can not stop approaching when the tip contact the surface. I also tried the PACscope as generic scope to monitor Exec-Freq, Res-phase, Res-Amp and so on. The output from the PACscope is as attached. It seems the displayed value is wrong and strongly fluctuating. I wonder if My PACscope setting is not currect or the PAC-channel do not give the currect output.

    Sorry for all the troubles.

    Lifeng

     
  • Percy Zahl

    Percy Zahl - 2012-10-21

    Sorry, I did not got to this issue yet.

    How exactly did you set up the feedback mixer channels? Can you show me a screen shot please?

    If the approach works with a regular ADC0..3 signal it should also work with the "virtual" signals from the PLL.

    I suggest you use the 2nd mixer channel for Freq. in Linear mode, gain = 1 or may be smaller as needed. Can you record this channel while scanning OK? May be the "feedback" signum is wrong? (If this is the case it can not work) You may set the mixer gain to -1. I have to check but think this should work if needed.

    Also the PLL/PAC setup must be all very well tuned and stable.

    You may also consider to add a "safety" mixer channel in "FUZZY" mode and use
    the exec. amplitude as reference and if going beyond anything "normal" it mixes into the feedback signal and will force a tip lift off as backup!

     
  • Percy Zahl

    Percy Zahl - 2012-10-22

    Lifeng,

    sorry for the confusion.I actually have to check what the
    PAC:Exec-Freq LP(Filter64Out) is giving you. I am pretty sure it is NOT the freqshift but the absolute frequency and may not be in "Hz" unless....:

    So your -0.5Hz will not work right. I did not yet implemented a field or automatic "correction" to be able to use the diff freq..

    Please try to enter the according absolute number and sorry so far:

    Also -- unless you configured the setting "dHertz2Volt" setting in preferences/SPM... -- you must figure out a odd number to enter. I have to work on this. I strongly suggest to tune it in, enable the feedback and play with the setpoint until Z responds to test it out!!

    I will need some time (busy) to get to this and make it more convenient and transparent -- sorry.

     
  • Lifeng Hao

    Lifeng Hao - 2012-10-22

    Hi Percy,

    Thanks a lot for your quick answer! And very glad that the problem can be addressed. I also tested the PAC-channel today, following your suggestion to monitor the PAC output during scan. Just as you said, the output from PAC:Exec-Freq LP (Filter64Out) is an absolute value. In my case, 32700Hz corresponds to about 3679.15V, while 32704Hz to 3679.43V. It seems all the ref. value in the PAC/operation tab is not functioning.

    Lifeng

     
    • Percy Zahl

      Percy Zahl - 2012-11-13

      Hi Lifeng,

      sorry it took some time. (in CVS)

      But I have now fixed this issue with the proper freq. value for the
      feedback (Mixer channel 2). See sample screenshot.
      The number you set in PAC / operation for Exec. Ref. is now used as
      reference for the feedback and you can put in just +/- Hz relative to this.
      Also I "hard coded" this "Hz translation" for mixer channel two for now
      -- no configuration needed.
      However, if you pick "Hz" as unit some where (i.e. for a data channel)
      you can set a conversion factor for display/reading.
      Also recorded are still the raw PLL numbers if you look at this channel.

      regards
      -Percy

      Dr. Percy Zahl                        Email:         pzahl@bnl.gov
      Center for Functional Nanomaterials   WWW:  http://www.cfn.bnl.gov
      P.O. Box 5000, Bldg. 735 - NC         Fax:      +01 (631) 344-3093
      Brookhaven National Laboratory        Work:     +01 (631) 344-2968
      Upton, NY 11973-5000, USA
      

      Please avoid sending me Word or PowerPoint attachments.
      See http://www.gnu.org/philosophy/no-word-attachments.html
      Find my public pgp key here: http://keyserver2.pgp.com/

      .^.
      /V\
      

      //G\ Visit Gxsm now! Unlimited and free SPM+ software:
      /(XSM)\ -----> http://gxsm.sf.net<------
      ^^-^^

      On 10/22/2012 04:55 AM, Lifeng Hao wrote:

      Hi Percy,

      Thanks a lot for your quick answer! And very glad that the problem can
      be addressed. I also tested the PAC-channel today, following your
      suggestion to monitor the PAC output during scan. Just as you said,
      the output from PAC:Exec-Freq LP (Filter64Out) is an absolute value.
      In my case, 32700Hz corresponds to about 3679.15V, while 32704Hz to
      3679.43V. It seems all the ref. value in the PAC/operation tab is not
      functioning.

      Lifeng


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/gxsm/discussion/40920/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/prefs/

       
  • Percy Zahl

    Percy Zahl - 2012-10-22

    Sorry may be missleading.
    PAC ref number is so far ONLY used together with range to compute and set the min/max values for PAC.

     
  • Percy Zahl

    Percy Zahl - 2012-10-25

    I am working on making this user friendly....

    so far the "raw" number you get for the frequency from the PLL/PAC lib is to be converted like this to get the Hz number of the exec. freq. of the resonator:

    150000.MIXER_FB_PROC[1]/(((1<<29)-1)2.*3.14159265358979323846)

    where MIXER_FB_PROC[1] is the number you get.

    And to make it more ugly by now... you have to set the V/Hz conversion in preferences (Instrument/dHertz2Volt) to "undo" this original Volt to Hz assumption (it's still assuming to read a voltage from a input what corresponds to a frequency (shift).

    32768./10 (150000./(((1<<29)-1)2.*3.14159265358979323846))
    ~0.14571070256501268223

    [see PLL and PAC lib docu from Softdb if you are interested in details about the number]

    if you want to test yourself.

    Also be aware of the fact that the "scan data" is not yet normalized if oversampling is active (slow scanning). Also working on this.

    I'll keep this up to date with the progress.

     
  • Percy Zahl

    Percy Zahl - 2012-10-28

    Just FYI:

    the feedback works ok with the PAC-freq. I am working on getting the units easier to adjust right and also to have the offset/reference taken into account.

    So far for testing I added "watches" for setpoint and actual "reading" in the mk3-spm-control.py script (settings window). It shows the raw numbers of all Mixer Channels Setpoints&Data of selected inputs the DSP deals with.

     
  • Lifeng Hao

    Lifeng Hao - 2012-10-29

    Hi Percy,

    How can I access the watches for Mixer Channels? Do you mean /SRanger/Ticc-project-files/MK3-A810_spmcontrol/python_scripts/mk3pro_spm_control.py?

    Lifeng

     
  • Lifeng Hao

    Lifeng Hao - 2012-11-05

    Hi Percy,

    Sorry to bother you. I am working on the PAC and FB. two questions:
    (1)what does the term of (1<<29) mean in the expression 150000.MIXER_FB_PROC1/(((1<<29)-1)2.*3.14159265358979323846)?
    (2) Where is the PLL and PAC document located? I went through the files provided by SoftdB, but did not find them.

    Thanks,

    Lifeng

     
  • Percy Zahl

    Percy Zahl - 2012-11-13

    update in CVS:
    - added the reference "Hz" value from PAC-control to be used at offset automatically, corrected Hz conversion (fixed build in). (The Volt/Hz setting has no effect any more here)

    see screen shot example.

    please test

     
    Last edit: Percy Zahl 2012-11-13
  • Lifeng Hao

    Lifeng Hao - 2012-12-06

    Thanks Percy,

    Now the PLL works!

    Lifeng

     

Log in to post a comment.