Scicos Block
fr - eng

Discrete zero crossing block





This block realizes a discrete threshold detection, by analyzing instaneous angular position of oscillator and generates events when a crossing at zero occurs.
To understand the computational function of that block, define an oscillator with the following formula :

y_{\rm {s}}\left(t\right)=\cos\left(\theta\left(t\right)\right)

with $ \theta(t)$ defined by :

\theta\left(t\right)=2\pi f_{o}t+\varphi_{\rm {s}}\left(t\right)

where $ f_{o}$ is the free-running frequency and $ \varphi_{\rm {s}}\left(t\right)$ the instantaneous phase of the oscillator. Moreover in steady state assume that :

\varphi_{\rm {s}}\left(t\right)<<2\pi f_{o}t

When sampling the angular position with constant step, $ \theta(t)$ becomes $ \theta_{k}$ and the following figure can be used to compute the event dates of the oscillator when zero crossing occurs.
Figure 1: Discrete computation of zero crossing dates of oscillator

At the time $ t_{k}$, we can do an extrapolation of the argument of the cosine function by writting the following equality :


Finally, we can write the date of the event generation :


with $ h$ the integration step.

Dialog box


Default properties

Interfacing function

Computational function

See also


A. Layec


[1] A. Demir, ``Analysis and simulation of noise in nonlinear electronic circuits and system,'' Ph.D., University of California, Berkeley, 1997.