Discrete TF
DiscreteImplements a discrete-time transfer function H(z) = B(z)/A(z) using the Direct Form II Transposed structure. Coefficients are specified as space-separated values in descending powers of z.
Mathematical Model
Coefficients are given in descending powers of z. Example: numerator 1 0.5 means z + 0.5.
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in |
In | number | Required |
| → In | reset |
Reset | number | Optional |
| ← Out | out |
Out | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
numerator |
Numerator B(z) | polynomial | 1 |
|
denominator |
Denominator A(z) | polynomial | 1 -0.5 |
|
sampleTime |
Sample Time | number | 0.01 |
|
initialCondition |
Initial Condition | number | 0 |
Usage Examples
| Transfer Function | Numerator | Denominator |
|---|---|---|
| First-order LP: 0.5/(z - 0.5) | 0 0.5 | 1 -0.5 |
| Moving average: (1 + z⁻¹)/2 | 0.5 0.5 | 1 |
| Unit delay: z⁻¹ | 0 1 | 1 0 |
Remarks & Best Practices
- Causality: Numerator order should not exceed denominator order for proper real-time implementation
- Initial transients: Filter states start at zero; first few output samples reflect start-up transient behaviour
- Sample time: Must match or be a multiple of the simulation's base sample time
- Coefficient format: Coefficients are space-separated in descending powers of z; trailing zeros in the numerator are significant
- Direct Form II Transposed: Numerically robust implementation with fewer delay states than Direct Form I
Related Components
- TransferFunction: Continuous-time transfer function G(s)
- UnitDelay: Simple one-sample delay (z⁻¹)