03.08.2013 Views

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Function GFLIB_Lut1D_FLT<br />

The interpolating intervals are defined in the table provided by the pfltTable member of<br />

the parameters structure. The table contains ordinate values consecutively over the entire<br />

interpolating range. The abscissa values are assumed to be defined implicitly by a single<br />

interpolating interval length. The abscissa value is equal to the multiplication of the<br />

interpolating index <strong>and</strong> the interpolating interval length. For example, a table contains 4<br />

interpolating points. The interpolating interval length in this example is equal to 2 -1 =0.5 .<br />

It should be noted that the pfltTable pointer does not have to point to the start of the<br />

memory area of ordinate values. There<strong>for</strong>e, the interpolating index can be positive or<br />

negative or, even, does not have to have zero in its range.<br />

A special algorithm is used to make the computation efficient, however, under some<br />

additional assumptions, as provided below:<br />

• the values of the interpolated function are 32 bits long<br />

• the length of each interpolating interval is equal to 2 -n , where n is an integer in the<br />

range of 1, 2, ... 29<br />

• the abscissa provided <strong>for</strong> interpolation is 32 bits long<br />

The algorithm per<strong>for</strong>ms the following steps:<br />

1. Count the equidistant interpolating interval, in which the linear interpolation will be<br />

per<strong>for</strong>med:<br />

2.<br />

3.<br />

Equation GFLIB_Lut1D_Eq2<br />

where fSegments is the interval length <strong>and</strong> the pParam->s32ShamOffset is the shift<br />

amount provided in the parameters structure as the member s32ShamOffset. Operator<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!