Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Asset Framework and PI System Explorer (PI Server 2018)

Examples of linear and bilinear interpolation in table lookup data references

Examples of linear and bilinear interpolation in table lookup data references

  • Last UpdatedJan 11, 2023
  • 1 minute read

Linear interpolation example

In a tank strapping table that contains a Level column and a Volume column, the following configuration string interpolates the volume based on the level reading:

SELECT Volume FROM MyTable WHERE INTERPOLATE(Level, @MyLevelReading)

Assume the sample table has the following rows:

Level

Volume

1

0.0

2

20.0

3

30.0

4

40.0

5

60.0

6

70.0

  • A Level reading of 2.2 results in a returned Volume of 22.0.

  • A Level reading of 2.7 results in a returned Volume of 20.0 when Stepped is selected (true).

  • Extrapolation: A Level reading of 6.5 results in a returned Volume of 75.0 when Stepped is cleared (false).

  • Extrapolation: A Level reading of 6.5 results in a returned Volume or 70.0 when Stepped is selected (true).

Bilinear interpolation example

In an air velocity table that contains an X Horizontal Position column, a Y Vertical Position column, and a Velocity column, the following configuration string interpolates the velocity based on the X horizontal and Y vertical positions.

SELECT Velocity FROM Table1 WHERE INTERPOLATE([X Horizontal Position], @X) AND INTERPOLATE([Y Vertical Position], @Y)

Assume the sample table has the following rows:

X Horizontal Position

Y Vertical Position

Velocity

180

140

4.6

220

140

4.1

260

140

2.7

180

180

4.8

220

180

4.4

260

180

2.5

180

220

4.5

220

220

4.4

260

220

2.5

An X Horizontal Position of 245 and a Y Vertical Position of 165 results in a returned Velocity of 3.2171875.

In This Topic
TitleResults for “How to create a CRG?”Also Available in