Zero Crossing
Count number of times signal crosses zero in single time step
Libraries:
DSP System Toolbox /
Signal Operations
Description
The Zero Crossing block concludes that a signal in a given channel has passed through zero if it meets any of the following criteria, where xi is the current value of the signal, xi−1 is the previous value, and so on:
xi < 0 and xi−1 > 0
xi > 0 and xi−1 < 0
For a positive integer L, xi < 0, xi−1 = 0, and xi−L−1 > 0, where .
For a positive integer L, xi > 0, xi−1 = 0, and xi−L−1 < 0, where .
For the first value of the input signal, xi−1 and xi−2 are zero. The block outputs the number of times the signal crosses zero in a single time step at the Cnt port.
Examples
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Extended Capabilities
Version History
Introduced before R2006a
See Also
Hit Crossing (Simulink)