# Friction (G Dataflow)

Implements a discontinuity at zero with linear behavior elsewhere.  ## input

Input signal.

This input accepts a double-precision, floating-point number or an array of double-precision, floating-point numbers. ## gain

Slope of the friction element.

This input accepts a double-precision, floating-point number or an array of double-precision, floating-point numbers.

Default: 0 ## offset

Offset of the friction element.

This input accepts a double-precision, floating-point number or an array of double-precision, floating-point numbers.

Default: 0 ## output

Output signal.

This output can return a double-precision, floating-point number or an array of double-precision, floating-point numbers.

## Algorithm for Computing the Output Signal

The node uses the following equation to implement a discontinuity at zero with linear behavior elsewhere.

$y=\left\{\begin{array}{c}0\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\mathrm{if}\text{}u=0\\ u*\mathrm{gain}+\mathrm{offset}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\text{}\mathrm{if}\text{}u>0\text{}\\ u*\mathrm{gain}-\mathrm{offset}\text{}\text{}\text{}\text{}\mathrm{if}\text{}u<0\text{}\end{array}$

where y is the output signal and u is the input signal.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application