主要内容

Selecting an Adaptation Method

R2026b

You specify the algorithm using the Adaptation Method drop-down list in the Function Block Parameters dialog box of an adaptive lookup table block. This section discusses the details of these algorithms.

Sample Mean

Sample mean provides the average value of n output data samples and is defined as:

y^(n)=1n∑i=1ny(i)

where y(i) is the ith measurement collected within a particular cell. For each input data u, the sample mean at the corresponding cell is updated using the output data measurement, y. Instead of accumulating n samples of data for each cell, a recursive relation is used to calculate the sample mean. The recursive expression is obtained by the following equation:

y^(n)=1n[∑i=1n−1y(i)+y(n)]=n−1n[1n−1∑i=1n−1y(i)]+1ny(n)=n−1ny^(n−1)+1ny(n)

where y(n) is the nth data sample.

Defining a priori estimation error as e(n)=y(n)−y^(n−1), the recursive relation can be written as:

y^(n)=y^(n−1)+1ne(n)

where n≥1 and the initial estimate y^(0) is arbitrary.

In this expression, only the number of samples, n, for each cell— rather than n data samples—is stored in memory.

Sample Mean with Forgetting

The adaptation method Sample Mean has an infinite memory. The past data samples have the same weight as the final sample in calculating the sample mean. Sample mean (with forgetting) uses an algorithm with a forgetting factor or Adaptation gain that puts more weight on the more recent samples. This algorithm provides robustness against initial response transients of the plant and an adjustable speed of adaptation. Sample mean (with forgetting) is defined as:

y^(n)=1∑i=1nλn−i∑i=1nλn−iy(i)=1∑i=1nλn−i[∑i=1n−1λn−iy(i)+y(n)]=s(n−1)s(n)y^(n−1)+1s(n)y(n)

where λ∈[0,1] is the Adaptation gain and s(k)=∑i=1kλn−i.

Defining a priori estimation error as e(n)=y(n)−y^(n−1), where n≥1 and the initial estimate y^(0) is arbitrary, the recursive relation can be written as:

y^(n)=y^(n−1)+1s(n)e(n)=y^(n−1)+1−λ1−λne(n)

A small value of λ results in faster adaptation. A value of 0 indicates short memory (last data becomes the table value), and a value of 1 indicates long memory (average all data received in a cell).