Version:

Last Modified: January 9, 2017

Returns the exponential fit of a data set using a specific fitting method.

An array of dependent values representing the *y*-values of the data set.

This input changes to **signal** when the data type is a waveform or an array of waveforms.

An array of independent values representing the *x*-values of the data set.

This input is available only if you wire an array of double-precision floating-point numbers to **y** or **signal**.

An array of weights for the data set.

Value that determines when to stop the iterative adjustment of the amplitude, damping, and offset.

If **tolerance** is less than or equal to 0, this node sets **tolerance** to 0.0001.

How tolerance Affects the Outputs with Different Fitting Methods

For the Least Square and Least Absolute Residual methods, if the relative difference between **residue** in two successive iterations is less than **tolerance**, this node returns the resulting **residue**. For the Bisquare method, if any relative difference between **amplitude**, **damping**, and **scale** in two successive iterations is less than **tolerance**, this node returns the resulting **amplitude**, **damping**, and **scale**.

**Default: **0.0001

Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

**Default: **No error

Upper and lower constraints for the amplitude, damping, and offset of the calculated exponential fit.

Lower bound for the amplitude.

**Default: **-Infinity, which means no lower bound is imposed on the amplitude.

Upper bound for the amplitude.

**Default: **Infinity, which means no upper bound is imposed on the amplitude.

Lower bound for the damping.

**Default: **-Infinity, which means no lower bound is imposed on the damping.

Upper bound for the damping.

**Default: **Infinity, which means no upper bound is imposed on the damping.

Lower bound for the offset.

**Default: **0

Upper bound for the offset.

**Default: **0

The fitting method.

Name | Value | Description |
---|---|---|

Least Square | 0 | Uses the least square method. |

Least Absolute Residual | 1 | Uses the least absolute residual method. |

Bisquare | 2 | Uses the bisquare method. |

Algorithm for the Least Square Method

The least square method of fitting finds the **amplitude**, **damping**, and **offset** of the exponential model by minimizing the **residue** according to the following equation:

$\frac{1}{N}\underset{i=0}{\overset{N-1}{\sum}}{w}_{i}{({f}_{i}-{y}_{i})}^{2}$

where

*N*is the length of**y**or the number of data values in a waveform*w*_{i}is the*i*^{th}element of**weight***f*_{i}is the*i*^{th}element of**best exponential fit***y*_{i}is the*i*^{th}element of**y**or the*i*^{th}data value in a waveform

Algorithm for the Least Absolute Residual Method

The least absolute residual method finds the **amplitude**, **damping**, and **offset** of the exponential model by minimizing the **residue** according to the following equation:

$\frac{1}{N}\underset{i=0}{\overset{N-1}{\sum}}{w}_{i}|{f}_{i}-{y}_{i}|$

where

*N*is the length of**y**or the number of data values in a waveform*w*_{i}is the*i*^{th}element of**weight***f*_{i}is the*i*^{th}element of**best exponential fit***y*_{i}is the*i*^{th}element of**y**or the*i*^{th}data value in a waveform

Algorithm for the Bisquare Method

The bisquare method of fitting finds the **amplitude**, **damping**, and **offset** using an iterative process, as shown in the following illustration.

The node calculates **residue** according to the following equation:

$\frac{1}{N}\underset{i=0}{\overset{N-1}{\sum}}{w}_{i}{({f}_{i}-{y}_{i})}^{2}$

where

*N*is the length of**y**or the number of data values in a waveform*w*_{i}is the*i*^{th}element of**weight***f*_{i}is the*i*^{th}element of**best exponential fit***y*_{i}is the*i*^{th}element of**y**or the*i*^{th}data value in a waveform.

**Default: **Least Square

A waveform or array representing the exponential curve that best fits the input signal.

Amplitude of the fitted model.

Damping of the fitted model.

Offset of the fitted model.

Weighted mean error of the fitted model.

This node uses the iterative general least square method and the Levenberg-Marquardt method to fit data to an exponential curve of the general form described by the following equation:

$f=a{e}^{bx}+c$

where

*x*is the input sequence*a*is**amplitude***b*is**damping***c*is**offset**

This node finds the values of *a*, *b*, and *c* that best fit the observations (**x**, **y**).

The following equation specifically describes the exponential curve resulting from the exponential fit algorithm:

$y[i]=a{e}^{bx\left[i\right]}+c$

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: Not supported