🔢

# Discrete Blocks

The following blocks are defined as having a discrete time_mode

Same as continuous integrator, but applies a local forward Euler method for integration.

Parameters, Inputs, Outputs, and Data Types are all the same as for the continuous integrator.

Holds and delays the input by one Discrete Step.

Implements a discrete transfer function as described in https://en.wikipedia.org/wiki/Z-transform#Transfer_function

Parameters, Inputs, Outputs, and Data Types are all the same as for the continuous transfer function.

Computes the first-order approximation of the first derivative of the input signal with respect to time.

Similar to Derivative block, but uses less states to compute the derivative.

Implements a simple PID controller defined in https://en.wikipedia.org/wiki/PID_controller, but operates in discrete time.

- Parameters
- Kp: the proportional gain.
- Ki: the integral gain.
- Kd: the derivative gain.

- Data Types
- double

- Parameters
- Filter Type: FIR or IIR
- B coefficients
- A coefficients (only applicable for IIR selection)

- Data Types
- double

- Parameters
- Amplitude: the value of the pulse wave when the wave is high.
- Pulse width: the fraction between 0 and 1 of the period that the pulse wave is high.
- Period: the length of time between two sequential rising edges of the pulse wave.
- Phase delay: an amount time by which the first rising edge is delayed after the simulation start time.

- Outputs
- pulse wave signal

- Data Types
- double

- Events
- This block produces periodic events triggering majors steps for each rising edge and each falling edge.

Outputs

`True `

for first discrete step, then outputs `False `

there after. Or, outputs `False `

for first discrete step, then outputs `True `

there after.Practical for cases where it is necessary to have some signal fed initially by some initialization, but then after from else in the model.

A source block that emits R,G,B color channels as matrices from a video file (

`.mp4`

). Since the output type is uint8 it can only be consumed by a Python Script, Object Detection, Image Segmentation or Predictor blocks.- Parameters
`File name`

: the video file to use as source data. Must be a valid`mp4`

video at a fixed resolution and framerate.

- Outputs
- 3 x W x H matrix of uint8 values.

- Notes:
- For more information on how to use the R,G,B pixel data, refer to the
`ImageSource`

block (found under Agnostic Blocks).

Last modified 1mo ago