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

两盒软妹~` 提交于 2019-12-24 16:26:41

问题


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?


回答1:


Here's my suggestion:

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:




回答2:


I find one another way to do this:

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

Result:

Constant 1 is an amplitude of pulse, 3 in Compare To Constant block - is a length of pulse.



来源:https://stackoverflow.com/questions/34327814/need-to-generate-pulse-when-a-signal-crosses-zero-point-in-simulink

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!