Processing math: 100%

DER – Derivation, filtering and prediction from the last n+1 samples

Block SymbolLicensing group: STANDARD
PIC

Function Description
The DER block interpolates the last n+1 samples (nN1, N is implementation dependent) of the input signal u by a line y=at+b using the least squares method. The starting point of the time axis is set to the current sampling instant.

In case of RUN=on the outputs y and z are computed from the obtained parameters a and b of the linear interpolation as follows:

Derivation:y=aFiltering:z=b,fortp=0Prediction:z=atp+b,fortp>0Retrodiction:z=atp+b,fortp<0

In case of RUN=off or n+1 samples of the input signal are not yet available (RDY=off), the outputs are set to y=0, z=u.

Inputs

u

Analog output of the block

Double (F64)

RUN

Enable execution

Bool

off ..

tracking (z=u)

on ...

filtering (y – estimate of the derivative, z – estimate of u at time tp)

tp

Time instant for prediction/filtering (tp=0 corresponds with the current sampling instant)

Double (F64)

Outputs

y

Estimate of input signal derivative

Double (F64)

z

Predicted/filtered input signal

Double (F64)

RDY

Ready flag (all n+1 samples are available)

Bool

Parameters

n

Number of samples for interpolation (n+1 samples are used); 1nnmax  1 10000000 10

Long (I32)

nmax

Limit for parameter n (used for internal memory allocation)  1 10000000 10

Long (I32)

2023 © REX Controls s.r.o., www.rexygen.com