BlockWerk Documentation
Δ

Discrete d/dt

Discrete

Computes the discrete-time derivative (backward difference) of the input signal. Outputs zero on the first sample.

Simulate in BlockWerk

Interactive sandbox directly in your browser — zero installation, WASM-powered.

Simulate in BlockWerk →

Mathematical Model

y[n]=u[n]−u[n−1]T,y[0]=0y[n] = \frac{u[n] - u[n-1]}{T}, \quad y[0] = 0

where y[n] is the current output, u[n] the current input, and T the sample time.

Inputs & Outputs

Direction ID Label Type Status
→ In in In number Required
← Out out Out number Output

Parameters

Parameters Label Type Default Description
sampleTime Sample Time number 0.01

Usage Examples

  • Zie de ingebouwde voorbeelden in de handleiding voor een demonstratie van dit blok.

Remarks & Best Practices

  • Noise amplification: Differentiation amplifies high-frequency noise; pre-filter noisy signals with Smooth or a low-pass filter
  • First sample: Output is zero on the first simulation step (no prior input value available)
  • Sample time: Smaller sample times increase derivative gain; the output is scaled by 1/T
  • Backward difference: This is the standard backward Euler differentiator — causal and computationally efficient
  • For continuous design: Use the Derivative block (with built-in filtering) for smoother continuous differentiation

Related Components