## Documentation Center |

Model discontinuity at zero, with linear gain elsewhere

The Coulomb and Viscous Friction block models Coulomb (static) and viscous (dynamic) friction. The block models a discontinuity at zero and a linear gain otherwise.

The block output matches the MATLAB^{®} result for:

y = sign(x) .* (Gain .* abs(x) + Offset)

where `y` is the output, `x` is
the input, `Gain` is the signal gain for nonzero
input values, and `Offset` is the Coulomb friction.

The block accepts one input and generates one output. The input can be a scalar, vector, or matrix with real and complex elements.

For a scalar input,

`Gain`and`Offset`can have dimensions that differ from the input. The output is a scalar, vector, or matrix depending on the dimensions of`Gain`and`Offset`.For a vector or matrix input,

`Gain`and`Offset`must be scalar or have the same dimensions as the input. The output is a vector or matrix of the same dimensions as the input.

The Coulomb and Viscous Friction block supports real inputs of the following data types:

Floating point

Built-in integer

Fixed point

The block supports complex inputs only for floating-point data
types, `double` and `single`. The
output uses the same data type as the input.

For more information, see
Data Types Supported by Simulink in
the Simulink^{®} documentation.

Suppose that you have the following modelmodel:

In this model, block input `x` and `Gain` are
scalar values, but `Offset` is a vector. Therefore,
the block uses element-wise scalar expansion to compute the output.

Suppose that you have the following modelmodel:

In this model, vector dimensions for block input `x` and `Offset` are
the same.

Suppose that you have the following modelmodel:

In this model, matrix dimensions for block input `x` and `Offset` are
the same.

Was this topic helpful?