Estimating Missing Points

About Estimating Missing Points

The second stage of a table lookup operation involves generating outputs that correspond to the supplied inputs. If the inputs match the values of indices specified in breakpoint data sets, the block outputs the corresponding values. However, if the inputs fail to match index values in the breakpoint data sets, Simulink estimates the output. In the block's parameter dialog box, you can specify how to compute the output in this situation. The available lookup methods are described in the following sections:

Interpolation Methods

When an input falls between breakpoint values, the block interpolates the output value using neighboring breakpoints. Most lookup table blocks let you select one of the following interpolation methods:

Each of these methods involves a trade-off between computation time and the smoothness of the result. Although rounding is quickest, it is the least smooth. Linear interpolation is slower than rounding but generates smoother results, except at breakpoints where the slope changes. Cubic spline interpolation is the slowest but produces the smoothest results.

Extrapolation Methods

When an input falls outside the breakpoint data set's range, the block extrapolates the output value from a pair of values at the end of the breakpoint data set. Most lookup table blocks let you select one of the following extrapolation methods:

In addition to these methods, some lookup table blocks, such as the Lookup Table (n-D) block, allow you to select an action to perform when encountering situations that require extrapolation. For instance, you can specify that Simulink generate either a warning or an error when the lookup table's inputs are outside the ranges of its breakpoint data sets. To specify such an action, select it from the Action for out of range input list on the block's parameter dialog box.

Rounding Methods

If an input falls between breakpoint values or outside the range of a breakpoint data set and you have not specified interpolation or extrapolation, the value is rounded to that of an adjacent breakpoint and returns the corresponding output value. Most lookup table blocks let you select one of the following rounding methods:

Example Output

Suppose the Lookup Table block in the following model is configured to use a vector of input values given by [-5:5], and a vector of output values given by sinh([-5:5]).

The following outputs are generated when using the specified lookup methods and inputs:

Lookup MethodInputOutputComment

Interpolation-
Extrapolation

1.4

2.156

N/A

 

5.2

83.59

N/A

Interpolation-
Use End Values

1.4

2.156

N/A

 

5.2

74.2

The value for sinh(5.0) was used.

Use Input Above

1.4

3.627

The value for sinh(2.0) was used.

 

5.2

74.2

The value for sinh(5.0) was used.

Use Input Below

1.4

1.175

The value for sinh(1.0) was used.

 

-5.2

-74.2

The value for sinh(-5.0) was used.

Use Input Nearest

1.4

1.175

The value for sinh(1.0) was used.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS