DSP Blockset
  Go to block:
    Search    Help Desk 
Edge Detector    See Also

Detect a transition of the input from zero to a nonzero value.

Library

Switches and Counters, in General DSP

Description

The Edge Detector block outputs a unit pulse (1) when the input transitions from zero to a nonzero value. Otherwise, the block outputs zeros at the same rate as the input.

The Frame-based inputs parameter allows you to choose between sample-based and frame-based operation

Sample-Based Operation

When the check box is not selected (default), the block assumes that the input is a scalar, a 1-by-N sample vector, or M-by-N sample matrix. A scalar sequence represents a single channel, as shown above. For a vector or matrix input, each of the N vector elements or M*N matrix elements is treated as an independent channel, and the block tracks the edges in each channel over time. The input and output sizes are identical.

Frame-Based Operation


When the Frame-based inputs check box is selected, the block assumes that the input is an M-by-N frame matrix. Each of the N frames in the matrix contains M sequential time samples from an independent signal. The illustration below shows a 6-by-4 matrix input:

The Number of channels parameter specifies the number of independent channels (columns), N, in the matrix, and the block tracks the edges in each channel independently over time. An edge that is split across two consecutive frames (i.e., a zero at the bottom of the first frame, and a nonzero value at the top of the following frame) is counted in the frame that contains the nonzero value. The input and output sizes are identical.

Frame-based operation provides substantial increases in throughput rates, at the expense of greater model latency.

Dialog Box

Frame-based inputs
Selects frame-based operation.
Number of channels
For frame-based operation, the number of columns (channels) in the input matrix.

See Also

Counter
Event-Count Comparator


[ Previous | Help Desk | Next ]