Main Content

simscape.multibody.JointAccelerationDictionary Class

Namespace: simscape.multibody

Dictionary that stores joint primitive accelerations

Since R2025a

Description

Use an object of the simscape.multibody.JointAccelerationDictionary class to store joint primitive accelerations to apply to a compiled multibody model. This object functions like a dictionary in that you can store joint primitives and their corresponding accelerations as key-value pairs. The keys are the paths of the joint primitives. To construct accelerations, use these classes:

Class Attributes

Sealed
true
ConstructOnLoad
true
RestrictsSubclassing
true

For information on class attributes, see Class Attributes.

Creation

Description

dict = simscape.multibody.JointAccelerationDictionary creates a joint acceleration dictionary.

You can use dict(keys) = Values to pair a joint acceleration with the path of corresponding joint primitives as the key-value pair. If you assign multiple values to the same key, the last value you assign overwrites the previous values of the key.

Examples

collapse all

  1. Create a joint acceleration dictionary.

    dict = simscape.multibody.JointAccelerationDictionary
    
    dict = 
    
      JointAccelerationDictionary with no accelerations.
  2. Construct accelerations for the joint primitives. Create an acceleration of 10 m/s^2 for a prismatic joint primitive and an acceleration of 5 rad/s^2 for a revolute joint primitive.

    acc_prismatic = simscape.multibody.PrismaticPrimitiveAcceleration(...
                         simscape.Value(10,"m/s^2"));
    acc_revolute = simscape.multibody.RevolutePrimitiveAcceleration(...
                         simscape.Value(5,"rad/s^2"));
    
  3. Use the dict dictionary to store the accelerations with the joint primitives as key-value pairs. The keys are the paths of the joint primitives.

    dict("Pg/Pz") = acc_prismatic;
    dict("Ri/Rz") = acc_revolute
    
    dict = 
    
      JointAccelerationDictionary with accelerations:
    
      RevolutePrimitiveAcceleration:
    
      Primitive Path  Value  Unit   
      ______________  _____  _______
    
      "Ri/Rz"       5      rad/s^2
    
      PrismaticPrimitiveAcceleration:
    
      Primitive Path  Value  Unit 
      ______________  _____  _____
    
      "Pg/Pz"       10     m/s^2

    You can change the acceleration for a joint primitive. For example, to replace the actuation torque on the joint Ri with a new acceleration, enter:

    acc_revolute_new = simscape.multibody.RevolutePrimitiveAcceleration(...
                         simscape.Value(-8,"rad/s^2"));
    dict("Ri/Rz") = acc_revolute_new
    dict = 
    
      JointAccelerationDictionary with accelerations:
    
      RevolutePrimitiveAcceleration:
    
      Primitive Path  Value  Unit   
      ______________  _____  _______
    
      "Ri/Rz"       -8     rad/s^2
    
      PrismaticPrimitiveAcceleration:
    
      Primitive Path  Value  Unit 
      ______________  _____  _____
    
      "Pg/Pz"       10     m/s^2

Version History

Introduced in R2025a