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 (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); 1 n nmax   1  10000000 10

Long (I32)

nmax

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

Long (I32)

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