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 (n N 1, 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 = a Filtering: z = b,fortp = 0 Prediction: z = atp + b,fortp > 0 Retrodiction: 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

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

Outputs

y

Estimate of input signal derivative

double

z

Predicted/filtered input signal

double

RDY

Ready flag (all n + 1 samples are available)

bool

Parameter

n

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

long

nmax

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

long