Discrete

RateTransition Block

Zero-order hold rate transition. Samples the input at the block's own sample rate and holds the value until the next sample instant. Place between subsystems running at different rates to make the crossing explicit.

Open RateTransition in BlockWerk →

# Rate Transition Block

Description

The Rate Transition block transfers a signal across a sample-rate boundary using a zero-order hold (ZOH). It samples the incoming signal at its own sampleTime and holds that value constant until the next sample instant. The block makes the rate crossing explicit and prevents data hazards that arise when a fast subsystem drives a slow subsystem (or vice versa) without an explicit interface.

Place this block between any two subsystems that run at different sample rates — for example, between a 1 kHz sensor-reading loop and a 10 Hz control law, or between a continuous-time source and a discrete-time filter. The held output is deterministic and free of aliasing artefacts within the constraints of ZOH interpolation.

Mathematical Model

y[k] = u(t_s · k)    for t in [t_s · k, t_s · (k+1))

Where:

Parameters

sampleTime

Sample period in seconds at which the input is latched. The minimum accepted value is 0.0001 s (10 kHz). Default: 0.01 s (100 Hz).

initialCondition

Output value held before the first sample is taken (i.e., at t = 0 before the first update tick). Default: 0.

Examples

Bridging a fast sensor to a slow controller

Sensor (1 kHz) → RateTransition (sampleTime=0.1) → PID Controller (10 Hz) → Actuator

Downsampling a continuous sine to discrete

Sine → RateTransition (sampleTime=0.01) → DiscreteStateSpace

Remarks

See Also