1

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?

2 Answers2

2

Here's my suggestion: enter image description here

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:

enter image description here

brainkz
  • 1,335
  • 10
  • 16
0

I find one another way to do this:

enter image description here

Upper part of image - it's all simulink model, bottom part - is a resettable subsystem.

Result: enter image description here

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