LSS ST1 Not Tracking Trajectory Smoothly—Please Advise

Hi,

I am using the LSS ST1 servo in a project that requires it to track trajectories with both slow and fast oscillatory components. I just got the servo today and have been struggling to get it to move smoothly. I am sending it sine waves of 0.1 Hz to 2 Hz with amplitudes varying from 20 to 40 degrees. I’m sampling the sine wave such that a new position is sent to the servo every 10 ms. I am using the D action without T or S modifiers. I’ve linked some videos below to show the setup.

I was expecting to see something like this upon starting everything up, but instead the servo was extremely jittery. Just to put this in context, I was using a Dynamixel AX-12A up until about a week ago—the AX-12A was perfectly smooth once I tuned its control parameters (compliance slope and compliance margin), but the form factor isn’t as nice as the LSS ST1s. Consequently, I think other variables in my setup, such as power supply, should be a non-issue here (for the record, I am using a 12V 5A power supply).

This led me to investigate ways of “tuning” the control parameters for the LSS ST1s. This has proven to be challenging, as there are a large number of variables…well, too large to exhaustively check within a reasonable amount of time:

  • Angular stiffness
  • Holding stiffness
  • Angular acceleration
  • Angular deceleration
  • Max speed

I tested 37 different combinations of these 5 parameters without much luck. I was able to find some settings that worked better at low frequencies (e.g. 0.1 Hz), but these settings failed miserably at tracking higher frequencies such as 1 Hz, and vice versa. Some videos showing the severity of the issue I’m experiencing are below—for these videos, I left the max speed, angular acceleration, and angular deceleration to their default values (180.0, 100.0, and 100.0, respectively).

First test:

Note that for most of the settings I tested, the servo was able to move smoothly from point A to point B when I sent the position commands > 1 second apart. The problem really only seems to arise when I sample a general trajectory and command the servo to track it.

I feel like I must be doing something wrong…perhaps it is strictly necessary for me to include a T or S modifier for each command.

I would really appreciate any suggestions. Thank you,
-Tyler

Second test:

Third test:

@TyGamvrelis Appreciate you reaching out - we’re here to help. Seems like we might be in a different time zone, so sorry about the delayed reply.

To confirm, are you updating the position commands regularly? You write “every 10ms”,. Note that the servos have their own built-in motion controller, so you only need to send the final position and optional modifier. Updating the position that quickly creates glitches in the motion controller, which appears to be the case in the videos. Unlike RC servos and PWM pulses, these smart servos don’t require a period update to the position. For example if you want to sweep from one angle to the next,

  • Servo ID: 5
  • Current position: 0.0 degrees
  • Desired position: +90.0 degrees
  • Time for the move: 1 second
  • Command: #5D900T1000

This would move the servo from its current position of 0.0 degrees to 90.0 degrees in about 1000 milliseconds.

Alternatively, the speed modifier is just as effective, so if you want the speed to be, for example, 30rpm,
#5D900SR30
You’d only send a command to return to the first position once it has reached the desired end position. You can do this by sending a position query, or if the timing is just right, sending the “return” command after the desired time has elapsed.

If this is not the case, or if it does not seem like the answer here addresses the cause / effect, can you perhaps provide a bit more info regarding the commands you’re sending?

1 Like

Thank you for your quick response.

Yes, I am updating the position commands regularly (every 10 ms). The reason why is that I need the servo to move in accordance to sensor data, which consists of both slow and fast variations, in real-time. If I send commands less frequently, once per second for example, then the servo could only move in accordance with the slow variations and not the fast ones. So I think the issue is that servos don’t expect me to send them frequent updates, but it’s necessary for my application.

As you can see in the videos, I have the servo attached to a gimballed oil lamp. The idea behind the project is to (1) record the wave-induced motion of the oil lamp while it’s mounted on a boat, and (2) use servos to “play back” the motion at a later time. The wave-induced motion typically varies quite slowly, but since the sensor data is in a dynamic environment, transients can arise which I also want to capture and recreate.

Based on your reply, I am seeing two possible solutions:

  • Disable motion controller and continue updating position every 10 ms. For a servo with ID=5, this command would be “#5EM0”, right? I might be wrong, but I am guessing that disabling the motion controller could lead to erratic behaviour such as frequent overshoots
  • Send a T modifier for each position command with T=10ms, e.g. for a desired position of 45.0 degrees with 10 ms travel time we’d have “#5D450T10” (assuming ID=5). If 10 ms is too short for the servos to handle, I might be able to get away with sending positions slightly less frequently (e.g. every 20 ms with T=20 modifier), but I still need to send them quickly enough to capture the faster oscillatory motions.

What’re your thoughts on this? Are there any reference projects for these servos that involve real-time motion tracking?

Thanks again,
-Tyler

@TyGamvrelis Like you said, try the EM0 command which effectively deactivates the motion controller algorithm.
#5EM0

The new LSS Articulated Robot Am software, LSS FlowArm includes real-time tracking based on on-screen movements. There is a lot involved, including:

  • How many times the position is read (can you take an average of some values?)
  • How many times per second the new position is sent (try to bring it up to 100ms just to see the difference)
  • The angular stiffness (AS command).
  • Motion controller active or disabled (seems to have the greatest effect)
  • The torque acting on the servo at any time.

Don’t see that the time modifier will help given that it’s likely to be within the acceleration phase of the profile.

We’re experimenting on our end with what you’ve provided to see what values give the best / smoothest motion.

1 Like

Update: Change the angular acceleration (AA or CAA) and angular deceleration (AD / CAD) each to 1000. The motion controller works best with a bit of resistance.

Update: I did another round of testing this weekend and achieved much better results after disabling the motion controller! I also changed the AA and AD each to 1000. In summary, my current parameters are as follows:

  • Angular stiffness = -4
  • Holding stiffness = 0
  • Max speed = 180.0
  • Angular acceleration = 1000
  • Angular deceleration = 1000
  • Motion controller OFF
    As before, position updates are once every 10 ms.

Although the motion is much smoother now, I am noticing a small “hiccup” in the middle of the servo’s swing—it appears to come to a very brief stop as it passes through 0 degrees. I’ve linked to 2 videos below, one at full speed and one in slow motion. The position waveform in the videos is a 0.15 Hz sine wave with amplitude equal to 30 degrees.

  1. Full speed
    https://drive.google.com/open?id=1AKAKx56tk_N_6kJHmBEc7KutiFjtTL9L

  2. Slow motion. In particular, see the portion of the video from 42 to 50 seconds
    https://drive.google.com/open?id=1nokTXKfmJ3QZNSsa4hhDQ-6nrkmExoQE

I tried varying some parameters on the servo to fix this, but ultimately I was unsuccessful. For the record, here’s what I tried:

  • Angular stiffness (AS) set to 0, 1, 4, -4, -6, -8, -10 with all other parameters held constant. AS = 0 and AS = -4 seemed to produce the best results (with no clear distinction between them) while all the other settings looked worse
  • AS = 0 and updating positions once every 100 ms. This did not look nearly as good as AS = 0 and updating positions once every 10 ms
  • Using the timed move modifier in the position commands with the time set to 5 ms, 10 ms, 15 ms, and 30 ms. None of these looked good, plus, I read in the documentation that these modifiers engage the motion controller :stuck_out_tongue:. Suffice to say, I will be sticking with the regular position command

Do you have any suggestions for how to smooth this out?

Thanks again,
-Tyler

1 Like

Hi Tyler,

Video is looking much better! We’re always here and were planning to follow up to know if there was progress. Re-watched the second video quite a few times, especially from 42 to 50 like you indicated. Can spot a bit of “hesitation”, but not a lot. Could it be static friction? Do you suspect it’s related to the calculations related to passing over the encoder’s zero, or something about the mechanics changes at that point? If you think it’s the encoder, can you zero the servo somewhere else and see if it reoccurs? If it’s mechanical, something to test might be to actually add a little bit of friction (not much, just a bit), which forces the controller to operate at a higher PWM. As a side note, you might want to try the latest experimental firmware which can be found when checking the “EXP” box in the LSS Config after selecting Firmware Update. Be sure to write down which firmware you’re using now though in case you decide to go back.

Await your news,

1 Like

@TyGamvrelis
If you’re still on the project, note that we’ll be releasing firmware v368 in the coming days with a new motion controller mode “EM0” which has quite a few features you might like.

2 Likes

@cbenson
Thank you so much for your help! I probably should have mentioned this a few months ago, but motion looks good after zeroing the servos at 90 degrees—marking your previous post as the solution. Thanks for keeping me in the loop on the new firmware release, I will keep this in mind in case the setup requires any tweaks in the future :slight_smile:

1 Like