# Cable

**Libraries:**

Simscape /
Driveline /
Couplings & Drives

## Description

The Cable block represents an element that transfers tension
between two contact points. You can treat the block as an arbitrary tension transfer
device to simulate a variety of situations, including pulley networks, cable drives, and
serpentine belts. You can choose whether the cable exhibits slack upon loss of tension.
The block has a base port, **B**, and a follower port,
**F**. The cable stretches in tension when the base port leads the
follower port.

The block considers only the longitudinal translational motion and force exerted at the cable ends. The first figure shows a Translational Spring and Translational Damper block in parallel, which is functionally equivalent to the Cable block with zero mass. The second figure shows the same spring and damper blocks but with an additional Mass block on either side, which is functionally equivalent to the Cable block with a nonzero mass.

These figures only apply when the cable is in tension.

**Tip**

Confirm that your model operates as expected before you select the **Model
slack** and **Model mass** parameters. Verify that
the **B** and **F** ports are oriented properly by
viewing the tension plots of each cable in the **Simscape Results
Viewer** and looking for unexpected negative values.

The Cable block can act as a rope, belt, cable, or any other
device that has tensile strength and transmits tension between two contact points. A
contact point can be a pulley, a drum, or an ideal source. You can use the
**Stretch parameterization** parameter to control whether the
block acts as a constant or tabulated connection.

You can use this block to model stationary or travelling pulley networks. You can drive the Cable block with sources like the Ideal Translational Velocity Source block, or a Rope Drum block attached to an Ideal Force Source block.

For greater fidelity or numerical stability, you can choose to model the effect of mass on
the system. When you select **Model mass**, the block distributes
half of the total mass to either end of the cable. Adding a small amount of mass can
improve the initialization of your model. You can also specify the initial conditions of
the cable. If you choose to simulate slack, the block does not apply stiffness and
damping when the cable is in slack. Selecting **Model slack** or
**Model mass** enables the **Model gravity**
parameter. Including the effect of gravity improves accuracy for heavy cable
segments.

For cable segments with variable rest length, use the **Model variable rest
length** parameter to improve results for travelling pulley applications.
The block supports these examples of variable rest length scenarios:

One end of the cable is stationary, and the other end connects to a travelling pulley.

A cable is connected to a travelling pulley at each end.

You must use the correct orientation for the block when you select
**Model variable rest length**. To learn more, see Best Practices for Modeling Pulley Networks.

### Equations

The block equations refer to these quantities:

*F*is the tension force, where $$F={F}_{B}=-{F}_{F}.$$*x*is the deformation due to stretching, which you specify by using the_{s}**Stretch**variable. Simscape Results Explorer displays this quantity as`s`

.*K*is the spring stiffness coefficient. $$K({x}_{s})=0$$ when you select**Model slack**and $${x}_{s}<0$$.*D*is the damping coefficient.*m*is the total mass, which you specify by using the**Mass**parameter. The block distributes half of the total mass to each end.*x*is the position of the base node._{B}*x*is the position of the follower node._{F}*ẋ*is the stretch velocity._{s}*L*is the rest length of the cable segment._{Rest}*L*is the_{min}**Minimum rest length**parameter.*μ*is the**Linear density**parameter.

The Cable block responds to external load at the port
**B** as

$${F}_{B}({x}_{s}(t),t)=\frac{m}{2}{\ddot{x}}_{B}(t)+D{\dot{x}}_{s}(t)+K{x}_{s}(t),$$

and port **F** as,

$${F}_{F}({x}_{s}(t),t)=\frac{m}{2}{\ddot{x}}_{F}(t)-D{\dot{x}}_{s}(t)-K{x}_{s}(t),$$

where $${x}_{s}(t)={x}_{B}(t)-{x}_{F}(t)$$. The definitions of *D* and *V*
depend on the parameterization.

*D*and*K*are constant when you set**Stretch parameterization**to`Constant stiffness and damping`

and clear**Model variable rest length**.*D*is constant and*K = EA/L*when you set_{Rest}**Stretch parameterization**to`Constant stiffness and damping`

and select**Model variable rest length**, where EA is the value of the**Rigidity**parameter.*D = TLU(x*and_{s})*K = TLU(x*when you set_{s})**Stretch parameterization**to`Tabulated stiffness and damping`

and clear**Model variable rest length**.*D = TLU(x*and_{s}, x_{s}/L_{Rest})*K = TLU(L*when you set_{Rest}, x_{s}/L_{Rest})**Stretch parameterization**to`Tabulated stiffness and damping`

and select**Model variable rest length**.

The block overrides the value of *K* to
`0`

when you select **Model slack** and
*x _{s} < 0*.

The forces vary as functions of time and the stretch deformation,
*x _{s}*.

*K*and

*B*are functions of

*x*, such that $$K({x}_{s})=K$$ when there is no slack or you are not simulating slack. Otherwise, $$K({x}_{s})=0$$ when slack occurs at $${x}_{s}<0$$. The same logic applies for

_{s}*B*. The terms that involve mass only apply when you select the

**Model mass**parameter.

When you select **Model variable rest length**, takes the length as an
input at port **L**. To input the rest length, use a
Translational Motion Sensor block to determine
the motion of the cable segment. The block saturates the rest length such that

$${L}_{rest}=max(L-{x}_{s},{L}_{min})$$

When you select **Model variable rest length**
and **Model mass**, the block uses the value of the
**Linear density** parameter to determine the mass of the
cable segment such that

$$\begin{array}{l}m=\mu {L}_{Rest}\\ {f}_{Mass,B}=\frac{m}{2}{\dot{v}}_{B}\\ {f}_{Mass,F}=\frac{m}{2}{\dot{v}}_{F}\end{array}$$

When you select **Model variable rest
length**, **Model mass**, and **Model
gravity**, the block applies gravity to each end of the cable segment,
such that

$$\begin{array}{l}{f}_{Gravity}=mgcos(\theta )\\ {f}_{Gravity,B}=\frac{{f}_{Gravity}}{2}\\ {f}_{Gravity,F}=\frac{{f}_{Gravity}}{2}\end{array}$$

Positive cable velocity acts from port **B** to port
**F**. Positive gravity acts downward according to the cable orientation.

### Variables

To set the priority and initial target values for the block variables prior to simulation,
use the **Initial Targets** section in the block dialog box or Property
Inspector. For more information, see Set Priority and Initial Target for Block Variables.

Nominal values provide a way to specify the expected magnitude of a variable in a model.
Using system scaling based on nominal values increases the simulation robustness. Nominal
values can come from different sources, one of which is the **Nominal
Values** section in the block dialog box or Property Inspector. For more
information, see Modify Nominal Values for a Block Variable.

### Limitations

When you select the **Model mass** and **Model variable rest
length** parameters, the block uses a quasi-static model to calculate
force due to mass. The block does not account for the rate of change in the cable
segment mass. You can use a Variable Mass block to
include the effect of the varying mass on the tension due to mass.

## Examples

## Ports

### Input

### Conserving

## Parameters

## Extended Capabilities

## Version History

**Introduced in R2021a**