• AVR Freaks

Hot!Change Notification

Author
romain.delpoux
New Member
  • Total Posts : 17
  • Reward points : 0
  • Joined: 2017/03/24 13:36:54
  • Location: 0
  • Status: offline
2019/03/21 07:08:45 (permalink)
0

Change Notification

Hi Lubin,
Using the Change Notification Block, I have the period measuremt between two input change. What is the resolution of this period?
 
Best regards.
Romain
 
#1

3 Replies Related Threads

    Lubin
    Moderator
    • Total Posts : 360
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: Change Notification 2019/03/21 09:01:08 (permalink)
    0
    Hi Romain,
     
    The period between the last two pulses is measured through a timer.
    This timer provide the best possible resolution which cope with the maximum period specified in the QEI GUI.
     
    The obtained resolution should we shown in the QEI GUI (see attachement).
    The QEI{1,2}max variable evaluated in the Matlab Workspace is the value corresponding to the max period set.
    Thus the resolution in (s) is 
    resol = MaxPeriodSet / QEI{1,2}max
    with MaxPeriodSet in (s).
     
     
    Lubin

    Attached Image(s)

    #2
    romain.delpoux
    New Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2017/03/24 13:36:54
    • Location: 0
    • Status: offline
    Re: Change Notification 2019/03/22 09:05:53 (permalink)
    0
    Hi,
     
    So the resolution is the same than for the QEI.
    Thank you!
    Bon weekend.
    Romain
     
    #3
    Lubin
    Moderator
    • Total Posts : 360
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: Change Notification 2019/03/22 12:16:24 (permalink)
    0
    So the resolution is the same than for the QEI.

     
    The resolution is different from the QEI.
     
    Let's take an example with
    • one puse every 1ms (to be measured precisely).
    • The QEI block is sampled every 1ms. 
    • The Timer has a resolution of 10ns.
    1) Pulse counter (pseudo derivative from QEI position) output would takes value in {0, 1, 2} depending if 2 pulses took place between the two consecutive execution of the QEI block.
    2) Period woule take values near 100 (10e-9*100 => 1ms), measuring precisely the period between two pulses.
     
    ==> Precision is then much better using the period measurement.
     
    If we had
    • 100 pulses every 1ms (+- 5% let say)
    then
    1) Pulse counter would take value near 100. 
    2) Period measured would take values in {1,2} (representing respectively 100 pulses/ms, and 200 pulses/ms)
     
    Pulse counter is likely to be more precise here.
    A filtered version of the Period measurement would converge to the same correct value at the cost of extra computation and delay induced)
     
    ! Note that the QEI period measurement is not affected by the possible jitter on the execution time of the QEI block.
     
    Lubin
     
    edit: fixed 50 => 200 pulse/ms
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5