Main Content

simscape.multibody.AxialSpringDamper Class

Namespace: simscape.multibody
Superclasses: simscape.multibody.JointForceLaw

Construct axial spring-damper force law

Since R2022a

Description

Use an object of the simscape.multibody.AxialSpringDamper class to construct an axial spring-damper force law. You can use the force law to apply a pure axial force to a simscape.multibody.PrismaticPrimitive object. The force is based on the current position and velocity of the primitive

F=ks·(pp0)kdp˙,

where:

SymbolDescription
FApplied axial force
p0Equilibrium position of the spring
ksSpring stiffness
kdDamping coefficient
pPrismatic primitive position
p˙Prismatic primitive velocity

Class Attributes

Sealed
true
ConstructOnLoad
true
RestrictsSubclassing
true

For information on class attributes, see Class Attributes.

Creation

Description

asd = simscape.multibody.AxialSpringDamper constructs an axial spring-damper force law and sets the parameters to simscape.Value objects with a value of zero.

Properties

expand all

Equilibrium position of the spring, specified as a simscape.Value object that represents a scalar with a unit of length. The scalar can be positive, negative, or zero. The axial spring force is zero when the primitive position is at the equilibrium position.

Example: simscape.Value(1,"mm")

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Stiffness of the spring, specified as a simscape.Value object that represents a scalar with a unit of force/length. The scalar is a measure of how hard the spring pushes the primitive position toward the equilibrium position and must be nonnegative.

Example: simscape.Value(1,"N/m")

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Damping coefficient of the damper, specified as a simscape.Value object that represents a scalar with a unit of force/linear velocity. The scalar is a measure of how hard the damper resists the motion of a primitive and must be nonnegative.

Example: simscape.Value(1,"N/(m/s)")

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Examples

collapse all

This example shows how to set the spring and damping properties for the axial spring-damper force law. You can use this force law to specify the forces applied to corresponding joint primitives, such as a prismatic primitive constructed with the simscape.multibody.PrismaticPrimitive object.

Create an object that represents an axial spring-damper force law.

asd = simscape.multibody.AxialSpringDamper
asd = 
  AxialSpringDamper with properties:

    EquilibriumPosition: 0 (m)
        SpringStiffness: 0 (N/m)
     DampingCoefficient: 0 (N*s/m)

The default values for the spring and damping properties are zero.

To set the equilibrium position and stiffness of the spring, use a simscape.Value object.

asd.EquilibriumPosition = simscape.Value(25,"cm");
asd.SpringStiffness = simscape.Value(0.5,"N/cm")
asd = 
  AxialSpringDamper with properties:

    EquilibriumPosition: 25 (cm)
        SpringStiffness: 0.5000 (N/cm)
     DampingCoefficient: 0 (N*s/m)

To specify the damping coefficient of the damper, use a simscape.Value object.

asd.DampingCoefficient  = simscape.Value(0.1,"N/(m/s)")
asd = 
  AxialSpringDamper with properties:

    EquilibriumPosition: 25 (cm)
        SpringStiffness: 0.5000 (N/cm)
     DampingCoefficient: 0.1000 (N*s/m)

Use the AxialSpringDamper object to specify the force applied to a prismatic joint.

joint = simscape.multibody.PrismaticJoint;
joint.Pz.ForceLaws = asd;

Version History

Introduced in R2022a