Lss jerk at the end of deceleration

Hi all, I am using several LSS servos. Standard and high torque versions.

I am using the built in motion controller telling the servos to move to specific positions at a certain speed with acceleration and deceleration.

The issue I am having with all the servos I have is that they end their deceleration with a jerk as if they jump to full speed for a fraction of a second at the end of a trajectory.

The longer the deceleration (lower value) the worse the jerk is.

The system is controlled from an ESP 32 using a 3.3 to 5 v converter. All the servos respond as expected except for this problem.

What is this and can it be solved?

Thank you for any advice!

1 Like

@thorangutang Welcome to the RobotShop Community.

We’ll need to know more information:

  1. It sounds like if it’s just at the end of the deceleration phase, the value for Angular Holding stiffness (AH) may be set too high. The AH command is explained here in the Wiki.
    When the servo’s angle is “very close to” the desired (final) angular position, it goes into holding mode, which provides full power, which would effectively be full speed motion, as you’re experiencing. This is user configurable and can be set between -10 to +10 with a default of +4. You can query AH as well using the QAH command, and modify it for your application.

  2. Alternatively, you can also check the Angular Deceleration (AD) Command explained here:
    https://wiki.lynxmotion.com/info/wiki/lynxmotion/view/lynxmotion-smart-servo/lss-communication-protocol/#HAngularDeceleration28AD29

  3. If these don’t customize the behavior to your needs, we’ll need more information about the electrical and power setup as well as the code.

1 Like

Yes, I got the same issue. Played around with AH but not fix the issue yet.
I have two LSS but one is worst than the another.

@nodochau Can you provide a video? Not easy to help troubleshoot without details. Things which can affect motion include (though not limited to):

  • Control mode (serial EM0, EM1 & filtering vs. RC PWM)
  • If in serial, the configurations (AA, AD, AH etc.)
  • Commands being sent on the bus (i.e. the code itself)
  • Firmware version installed on each servo
  • Physical setup (how much torque is being applied and how for example)
  • Speed (low speed is hard to achieve at full torque in EM1 mode)
1 Like

Hi cbenson,

So if one has more load (more torque) than another, then The AH would be set at higher, right?

Thanks

There are four (main) parts to a motion profile when in EM1:

  • AA: Angular Acceleration
  • AD: Angular Deceleration
  • AH: Angular Holding Stiffness
  • AS: Angular Holding Stiffness

The Angular Holding Stiffness takes effect when the servo’s current position within the motion is within a specific range of the desired / requested final angular position. The servo leaves the “deceleration” state and enters the “holding” state. The higher the AH value, the more the motion controller will provide power to keep that position. Therefore is the AH value is high, the small transition between deceleration and holding will cause the servo to move faster than it was because it recognizes it’s off by a fraction of a degree and will need to move to it with as much power as possible.

Torque during a move is handled by the motion controller as well , but it can only do so much. The value to change here would be AS which is characterised as “The servo’s rigidity / angular stiffness can be thought of as (though not identical to) a damped spring in which the value affects the stiffness and embodies how much, and how quickly the servo tried keep the requested position against changes. There are no units.”

A high AS value would result in more jittery motion, but able to provide more torque, whereas a smaller AS value results is very smooth motion, with less torque.

1 Like

Hi all sorry about a late reply, other things to deal with.
A little further investigation and it seems like the decelration and acceleration is not working at all. The only effect of setting #AD and #AA seems to be causing jerks.
The only thing I have done to the servos after opening them is set the address, everything else is default.

I link to a short video showing the issue:
Speed: 30, Acceleration 10, Decelration 10: https://www.dropbox.com/s/mp3xzxlwpknf6vk/Jerk.mp4?dl=0
And with no issue if Acceleration and Deceleration are not set:
Speed: 30, Acceleration 100, Decelration 100: https://www.dropbox.com/s/63qy8x14smz1u6p/NoJerk.mp4?dl=0

Power is in one case directly from a 3 cell lipo battery and in another from a switching walwart powersupply set to 12 volts. The issue seems are the same in both cases. Right now it seems that the acceleration and deceleration simply are not working except for causing the issues described.

Using the commands AA, AD and D which the servos respond to.

Relevant snippets of code:

void lssAngularAcceleration(OSCMessage &msg, int addressOffset){
          int axis = getAxis(msg, addressOffset);
          int acceleration = msg.getInt(0);
    Serial1 << "#" << axis << "AA" << acceleration << '\r';
}

void lssAngularDeceleration(OSCMessage &msg, int addressOffset){
          int axis = getAxis(msg, addressOffset);
          int deceleration = msg.getInt(0);
    Serial1 << "#" << axis << "AD" << deceleration << '\r';
} 

void llsMove(OSCMessage &msg, int addressOffset){
        int axis = getAxis(msg, addressOffset);
 int target  = msg.getInt(0);
    Serial1 << "#" << axis << "D" << target << '\r'; 
}

Also, when querying the servos using #1QAA and #1QAD the servos return the correct values. The servos therefore receive the correct comands, they are just for some reason not executing them properly.

Hmm I seem to be getting resonable results with Angular stiffness set to -9 or -10(!).

And acceleration and deceleration in the 2 - 7 range.

It is possible that these are expected results, but it seems very unintuitive to have to divert so much from default values in order to use the motion controller in a meaningful manner?

The other thing is that if running at low speeds only being able to have meaningfull acceleration and decelration results in the first 10 values seems unintuitive. In my systems I cannot notice a difference in behaviour for any values over about 12. (Exept for jerkiness if angular stiffness is higher). This gives the controller a very low resulution!

1 Like

Based on the two videos you posted, the following comes to mind:

  • The effect looks similar to what would happen if there’s play between either the output spline and the horn, or if you are using external gears which have some play between them. Can you verify that there’s nothing loose between the servo horn and what you’re rotating?
  • Wondering if some of the motion at the end is from the effect of inertia

Just in case - note that you don’t need to set the configuration values repeatedly… they just need to be sent once as configuration commands and no longer need to appear in your code.

2 Likes