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

            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.
            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.
            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):
            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 .
            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!
            Hide
            tribeiro Tiago Ribeiro added a comment -

            Looks good... 

            Show
            tribeiro Tiago Ribeiro added a comment - Looks good... 

              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.