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

Please add a velocity test for "need to slew" to the MT rotator

    XMLWordPrintable

    Details

    • Story Points:
      2
    • Sprint:
      TSSW Sprint - Apr 26 - May 10, TSSW Sprint - May 10 - May 24
    • Team:
      Telescope and Site
    • Urgent?:
      No

      Description

      At present the MT rotator decides whether it needs to slew or track based on one criterion: position error is less than some threshold. This is unsafe and easily fooled, for two reasons:

      • Near the end of a slew it is easy for the position error to be small but the velocity error to be large. Thus the rotator can be fooled and report that a slew has ended too early.
      • When we slew to a new target it is possible for the rotator angle to be nearly the same but the velocity to be very different. The rotator may not realize that it has to slew until enough time has elapsed that the rotator error grows large enough.

        Attachments

        1. trackCmd.jpg
          trackCmd.jpg
          57 kB
        2. trackSingleTarget.png
          trackSingleTarget.png
          99 kB
        3. trackTwoTargets.png
          trackTwoTargets.png
          122 kB
        4. trackTwoTargetsClosePos_magnify.png
          trackTwoTargetsClosePos_magnify.png
          106 kB
        5. trackTwoTargetsClosePos.png
          trackTwoTargetsClosePos.png
          104 kB

          Issue Links

            Activity

            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            Russell suggests something like this in the trigger of slew:

            in_position = (actual_position - commanded_position_at_current_time) < pos_limit and (actual_velocity - commanded_velocity) < some_value

            Russell suggested:
             
            Note that you have to extrapolate or interpolate the commanded position to the current time (the time at which you sample the current position) for this to work properly
             

            Show
            ttsai Te-Wei Tsai added a comment - - edited Russell suggests something like this in the trigger of slew: in_position = (actual_position - commanded_position_at_current_time) < pos_limit and (actual_velocity - commanded_velocity) < some_value Russell suggested:   Note that you have to extrapolate or interpolate the commanded position to the current time (the time at which you sample the current position) for this to work properly  
            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            There is the extrapolation of position in the subsystem of posErrorCalc_OldCmd already. 
            Add the subsystem of compareDiffVelWithThold in the subsystem of slewAndTrackingParameters.

            Show
            ttsai Te-Wei Tsai added a comment - - edited There is the extrapolation of position in the subsystem of posErrorCalc_OldCmd  already.  Add the subsystem of  compareDiffVelWithThold  in the subsystem of  slewAndTrackingParameters .
            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            Track the single target without the problem:

            Track two targets without the problem:

            Show
            ttsai Te-Wei Tsai added a comment - - edited Track the single target without the problem: Track two targets without the problem:
            Hide
            ttsai Te-Wei Tsai added a comment -

            Because MOOG only considers the simplest case in the tracking, this new velocity test should have no affection to the existed algorithm. The interesting part is to test some edge case to see how to break the original algorithm.

            Show
            ttsai Te-Wei Tsai added a comment - Because MOOG only considers the simplest case in the tracking, this new velocity test should have no affection to the existed algorithm. The interesting part is to test some edge case to see how to break the original algorithm.
            Hide
            ttsai Te-Wei Tsai added a comment -

            I intentionally to make a fake tracking condition that two targets have the same position but different velocities (0.01 deg/sec vs -0.01 deg/sec):

            It looks like the rotator can track without breaking it (I expected to break it actually):

            I think this is because the tracking algorithm has the wrong (unphysical) behavior originally. We can see the discontinuity of velocity at time=6.15 sec:

             This will wait the Tekniker to fix it.

            Show
            ttsai Te-Wei Tsai added a comment - I intentionally to make a fake tracking condition that two targets have the same position but different velocities (0.01 deg/sec vs -0.01 deg/sec): It looks like the rotator can track without breaking it (I expected to break it actually): I think this is because the tracking algorithm has the wrong (unphysical) behavior originally. We can see the discontinuity of velocity at time=6.15 sec:  This will wait the Tekniker to fix it.
            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/16 2. https://github.com/lsst-ts/ts_rotator_controller/pull/20 Thanks!
            Hide
            rowen Russell Owen added a comment -

            There isn't anything I can see that I can review, but I'll approve it based on the graphs in this ticket.

            Show
            rowen Russell Owen added a comment - There isn't anything I can see that I can review, but I'll approve it based on the graphs in this ticket.

              People

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

                Dates

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

                  Jenkins Builds

                  No builds found.