I have an input signal I=sin(omega*t). Which simulink model do I use in order to get a pulse every time the signal crosses zero-point?
Asked
Active
Viewed 1,768 times
1
-
1[This block](http://se.mathworks.com/help/simulink/slref/detectrisepositive.html) with its output triggering a pulse generator comes to mind. – mikkola Dec 17 '15 at 06:46
-
Your post was very helpful thank you. – Atal Khattak Dec 17 '15 at 08:22
-
@mikkola And how could we trigger a pulse generator? The Simulink block named "Pulse Generator" does not have any input terminals. – alejnavab Apr 28 '21 at 14:59
2 Answers
2
The transport delay block makes a delayed version of input signal. You need to make the sampling rate of this block low. Then, signs of original and delayed signals are subtracted. If signs are equal you get 0, if signs are different (zero is crossed) then you get +-2. You take absolute value and divide signal by 2 to get:

brainkz
- 1,335
- 10
- 16
-
Can you please specify the parameters used for generating sine and for the transport delay function so that i can better understand the proposed model. Thank You. – Atal Khattak Dec 17 '15 at 07:56
-
Delay was set to 0.01, sine function was unchanged. Time step for the whole model was 0.001 and stop time was set to 50 – brainkz Dec 17 '15 at 08:01
-
0
I find one another way to do this:
Upper part of image - it's all simulink model, bottom part - is a resettable subsystem.
Constant 1
is an amplitude of pulse, 3
in Compare To Constant block - is a length of pulse.

Mikhail_Sam
- 10,602
- 11
- 66
- 102