Engee documentation

First Order Hold

Linearly extrapolated first-order retention for the input signal.

blockType: First Order Hold

Path in the library:

/Basic/Continuous/First Order Hold

Description

The First Order Hold block generates a continuous piecewise linear approximation of the input signal.

Use block First Order Hold to convert a discrete signal into a continuous signal without additional solver settings.

You can also use block First Order Hold to break algebraic loops in your model.

Ports

Input

# IN_1 — input signal
scalar | vector | matrix | N-dimensional array

Details

An input signal given as a real scalar, vector or matrix.

Data types

Float16, Float 32, Float64, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Bool.

Complex numbers support

No

Output

# OUT_1 — linearly approximated output signal
scalar | vector | matrix | N-dimensional array

Details

Piecewise linear approximation of the input signal.

Data types

Float64.

Complex numbers support

No

Parameters

Parameters

# Initial output — initial value of the output signal
Scalar / array of real numbers

Details

Specify the output value that the unit generates until the simulation time exceeds the first sampling time of the digital input.

The initial output of this block cannot be inf or NaN.

Default value

0

Program usage name

InitialOutput

Tunable

Yes

Evaluatable

Yes

# Output algorithm — output approximation method
Slow (Avoid Overshoot) | Fast (Minimize Error)

Details

Specify the approximation method used to generate the output signal.

The slow low-frequency algorithm Slow (Avoid Overshoot) avoids the appearance of an output signal that does not match the input signal.

The fast high-frequency algorithm Fast (Minimize Error) minimises the error in the approximated output signal, but may result in an output signal that does not match the input signal.

Values

Slow (Avoid Overshoot) | Fast (Minimize Error)

Default value

Slow (Avoid Overshoot)

Program usage name

OutputAlgorithm

Tunable

No

Evaluatable

No

# Reset if relative extrapolation error exceeds — permissible error when resetting the solver
Scalar / vector of real numbers

Details

Specify the tolerance level for the extrapolation error of the inference algorithm.

The value of Inf for the parameters Allow continuous input may lead to numerical inaccuracies in the simulation.
Default value

Inf

Program usage name

ErrorTolerance

Tunable

Yes

Evaluatable

Yes

# Allow continuous input — continuous signal resolution
Logical

Details

Select this parameter to allow the unit to accept continuous signals as input.

Enabling this parameter creates a delay between the input and output continuous signals.

Enable this parameter if you are using this unit to break algebraic loops.
Default value

false (switched off)

Program usage name

AllowContinuousInput

Tunable

No

Evaluatable

No