Atal Khattak
Atal Khattak

Reputation: 81

Need to generate pulse when a signal crosses zero point in simulink?

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?

Upvotes: 1

Views: 2079

Answers (2)

Mikhail_Sam
Mikhail_Sam

Reputation: 11228

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.

Upvotes: 0

brainkz
brainkz

Reputation: 1345

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

Upvotes: 2

Related Questions