Discrete d/dt
DiscreteComputes the discrete-time derivative (backward difference) of the input signal. Outputs zero on the first sample.
Mathematical Model
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
- Derivative: Continuous-time derivative
- DiscreteIntegrator: Discrete-time integrator (inverse operation)