Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-25795

Fix the Bugs of Transition of Tracking

    XMLWordPrintable

    Details

      Description

      Fix the transition of tracking in deciding the tracking trajectory. In the previous update (DM-25243), I made two mistakes. One is that I do not generate a smooth velocity command in the tracking (I forgot the 4000 Hz internal calculation). The other one is that I do not stop the rotator's velocity smoothly if there is no new tracking command for some time. This ticket is to fix these two bugs.

        Attachments

        1. badTransitionOfCmd.png
          badTransitionOfCmd.png
          71 kB
        2. digVelMagnify.png
          digVelMagnify.png
          60 kB
        3. extrapolationMagnifyFirstTarget.png
          extrapolationMagnifyFirstTarget.png
          59 kB
        4. extrapolationMagnifySecondTarget.png
          extrapolationMagnifySecondTarget.png
          60 kB
        5. extrapolationOverall.png
          extrapolationOverall.png
          56 kB
        6. trackNeg.png
          trackNeg.png
          72 kB
        7. trackPos.png
          trackPos.png
          56 kB
        8. trackVel.png
          trackVel.png
          10 kB
        9. updatedTracking.png
          updatedTracking.png
          55 kB
        10. velDip.png
          velDip.png
          47 kB

          Issue Links

            Activity

            No builds found.
            ttsai Te-Wei Tsai created issue -
            ttsai Te-Wei Tsai made changes -
            Field Original Value New Value
            Epic Link DM-25674 [ 436565 ]
            ttsai Te-Wei Tsai made changes -
            Link This issue relates to DM-25243 [ DM-25243 ]
            ttsai Te-Wei Tsai made changes -
            Description Fix the transition of tracking in deciding the tracking trajectory. In the previous update, I made two mistakes. One is that I do not generate a smooth velocity command in the tracking (I forgot the 4000 Hz internal calculation). The other one is that I do not stop the rotator's velocity smoothly if there is no new tracking command for some time. This ticket is to fix these two bugs. Fix the transition of tracking in deciding the tracking trajectory. In the previous update (DM-25243), I made two mistakes. One is that I do not generate a smooth velocity command in the tracking (I forgot the 4000 Hz internal calculation). The other one is that I do not stop the rotator's velocity smoothly if there is no new tracking command for some time. This ticket is to fix these two bugs.
            ttsai Te-Wei Tsai made changes -
            Sprint TSSW Sprint - Jul 6 - Jul 20 [ 1031 ] TSSW Sprint - Jul 20 - Aug 3 [ 1034 ]
            ttsai Te-Wei Tsai made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            ttsai Te-Wei Tsai made changes -
            Attachment trackNeg.png [ 45053 ]
            Attachment trackPos.png [ 45054 ]
            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            Test condition: two targets. The first target is at 1.2 deg with velocity = 0.01 deg/sec. The second target is at 3 deg with velocity = -0.01 deg/sec.

            The tracking velocity is continuous in the tracking process now:

            There is a dip of velocity transition here (to 2nd target):

            This velocity transitions from 0.01 deg/sec to -0.01 deg/sec happens in 0.005 seconds, which is 20 steps in 4000 Hz. We can see the acceleration > 0 for the new slew. Therefore, this transition does not make the physical sense at all.

            The tracking target and position command have the wrong time order (the left figure is in the positive tracking and the right one is in the negative tracking):

            Based on this order, I began to consider to use the interpolation instead.

            Show
            ttsai Te-Wei Tsai added a comment - - edited Test condition: two targets. The first target is at 1.2 deg with velocity = 0.01 deg/sec. The second target is at 3 deg with velocity = -0.01 deg/sec. The tracking velocity is continuous in the tracking process now: There is a dip of velocity transition here (to 2nd target): This velocity transitions from 0.01 deg/sec to -0.01 deg/sec happens in 0.005 seconds, which is 20 steps in 4000 Hz. We can see the acceleration > 0 for the new slew. Therefore, this transition does not make the physical sense at all. The tracking target and position command have the wrong time order (the left figure is in the positive tracking and the right one is in the negative tracking): Based on this order, I began to consider to use the interpolation instead.
            ttsai Te-Wei Tsai made changes -
            Attachment trackVel.png [ 45055 ]
            ttsai Te-Wei Tsai made changes -
            Attachment velDip.png [ 45056 ]
            Hide
            ttsai Te-Wei Tsai added a comment -

            Based on 'posErrorCalc_NewCmd' in 'Slew Mode Cmd Gen' subsystem, we can see the new received command (track) is always a command to reach instead of beginning.

            Show
            ttsai Te-Wei Tsai added a comment - Based on 'posErrorCalc_NewCmd' in 'Slew Mode Cmd Gen' subsystem, we can see the new received command (track) is always a command to reach instead of beginning.
            ttsai Te-Wei Tsai made changes -
            Attachment badTransitionOfCmd.png [ 45066 ]
            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            Not sure why I have the bad transition in the negative direction (velocity=-0.01 deg/sec < 0) but not the positive one (velocity=0.01 deg/sec > 0):

            Show
            ttsai Te-Wei Tsai added a comment - - edited Not sure why I have the bad transition in the negative direction (velocity=-0.01 deg/sec < 0) but not the positive one (velocity=0.01 deg/sec > 0):
            ttsai Te-Wei Tsai made changes -
            Attachment digVelMagnify.png [ 45067 ]
            ttsai Te-Wei Tsai made changes -
            Attachment extrapolationMagnifySecondTarget.png [ 45070 ]
            Attachment extrapolationMagnifyFirstTarget.png [ 45071 ]
            Attachment extrapolationOverall.png [ 45072 ]
            Hide
            ttsai Te-Wei Tsai added a comment -

            Update the 'Track Mode Cmd Gen' subsystem to remove one of 'unit delay' to do the extrapolation:

            The magnification of the first and second targets are:

            Show
            ttsai Te-Wei Tsai added a comment - Update the 'Track Mode Cmd Gen' subsystem to remove one of 'unit delay' to do the extrapolation: The magnification of the first and second targets are:
            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            After the discussion with Tiago, the pointing component always sends the future's target. Therefore, the rotator is doing the interpolation actually, although the method/ algorithm is bad. Based on this, the original code is correct, I should modify the code back.

            Updated the code back as the following. The flags of tracking success/ fault seems to work still:

            Discussed the interpolation algorithm with Tiago. The implemented code should update to use the algorithm suggested by Russell to fix the problem of jitter command. The ticket is DM-26156.

            Discussed the discontinuous velocity with Tiago. I should issue a ticket to fix this. The added ticket is DM-26155.

            Show
            ttsai Te-Wei Tsai added a comment - - edited After the discussion with Tiago, the pointing component always sends the future's target. Therefore, the rotator is doing the interpolation actually, although the method/ algorithm is bad. Based on this, the original code is correct, I should modify the code back. Updated the code back as the following. The flags of tracking success/ fault seems to work still: Discussed the interpolation algorithm with Tiago. The implemented code should update to use the algorithm suggested by Russell to fix the problem of jitter command. The ticket is DM-26156 . Discussed the discontinuous velocity with Tiago. I should issue a ticket to fix this. The added ticket is DM-26155 .
            ttsai Te-Wei Tsai made changes -
            Attachment updatedTracking.png [ 45074 ]
            ttsai Te-Wei Tsai made changes -
            Link This issue is triggering DM-26155 [ DM-26155 ]
            ttsai Te-Wei Tsai made changes -
            Link This issue is triggering DM-26156 [ DM-26156 ]
            Hide
            ttsai Te-Wei Tsai added a comment -

            Please help to review the PRs:
            1. https://github.com/lsst-ts/ts_mt_hexRot_simulink/pull/11
            2. https://github.com/lsst-ts/ts_rotator_controller/pull/10

            You could just base on the comments in ticket to do the review. The details we had discussed today. Thanks!

            Show
            ttsai Te-Wei Tsai added a comment - Please help to review the PRs: 1.  https://github.com/lsst-ts/ts_mt_hexRot_simulink/pull/11 2.  https://github.com/lsst-ts/ts_rotator_controller/pull/10 You could just base on the comments in ticket to do the review. The details we had discussed today. Thanks!
            ttsai Te-Wei Tsai made changes -
            Reviewers Tiago Ribeiro [ tribeiro ]
            Status In Progress [ 3 ] In Review [ 10004 ]
            Hide
            tribeiro Tiago Ribeiro added a comment -

            Looks good... 

            Show
            tribeiro Tiago Ribeiro added a comment - Looks good... 
            tribeiro Tiago Ribeiro made changes -
            Status In Review [ 10004 ] Reviewed [ 10101 ]
            ttsai Te-Wei Tsai made changes -
            Resolution Done [ 10000 ]
            Status Reviewed [ 10101 ] Done [ 10002 ]

              People

              Assignee:
              ttsai Te-Wei Tsai
              Reporter:
              ttsai Te-Wei Tsai
              Reviewers:
              Tiago Ribeiro
              Watchers:
              Te-Wei Tsai, Tiago Ribeiro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Start date:
                End date:

                  Jenkins

                  No builds found.