Coulomb and Viscous Friction

Model discontinuity at zero, with linear gain elsewhere

• Library:

HDL Coder / Discontinuities

• Description

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.

Ports

Input

expand all

The input signal to the model of Coulomb and viscous friction.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fixed point

Output

expand all

The output signal calculated by applying the friction models to the input.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fixed point

Parameters

expand all

To edit the parameters for the Coulomb and Viscous Friction block, double-click the block icon.

Specify the offset that applies to all input values.

Programmatic Use

 Block Parameter: offset Type: character vector Value: real values Default: '[1 3 2 0]'

Specify the signal gain for nonzero input values.

Programmatic Use

 Block Parameter: gain Type: character vector Value: real values Default: '1'

Block Characteristics

 Data Types double | fixed point | integer | single Direct Feedthrough no Multidimensional Signals no Variable-Size Signals no Zero-Crossing Detection no