How to Create a repeating pulse using single pulse without using Source Block(simulink)

Hi All I have created a single pulse which i want it to repeat every 2 seconds. How can i do that without using any of wave generator.

댓글 수: 3

What is source of your single pulse ?
How it works ?
i have used 1 [constant] as an input for bitwise XOR and another input to bitwise XOR is same 1 [constant] but with 3ms delay. . this pulse has to be repeated every 2 seconds. .
I am not sure, but you can place your pulse source in a triggered subsystem to trigger it at some interval to repeat the pulse every 2 second.
Or use a while iterator block to repeat the output with some time delay arrangement.

댓글을 달려면 로그인하십시오.

답변 (3개)

rajesh
rajesh 2012년 1월 31일
i am facing similar problem, but here i used pulsetran function for generating pulse, if i multiply with sine signal with this pulse, i am getting something else. can i know how u have created this pulse? any code. Thanks in advance

댓글 수: 1

hi rajesh. i need doc and videos to learn using pulstran function to generatre a pulse train signal.i'm new at matlab. can you help me?

댓글을 달려면 로그인하십시오.

This is just one way, but I've used it in the past to generate a pulse-sequence with 50% pulse-width:
----- -------------------------
| 0 |---------->| |
----- | |
Constant0 | Switch block |
------------------>|-| |-------------> Repeating Pulse
| ----- | Criteria: u2>=Threshold | |
| | 1 |---------->| Threshold=0.5 | |
| ----- | | |
| Constant1 ------------------------- |
| |
| ---------- |
-------------------------|Unit Delay|<--------------|
----------
You will need to tweak the sample times of the blocks to get a different pulse width - or alternately, use this generated pulse in place of your Constant block and XOR it with a delayed version of itself.
I am able to tweak pulse widths(3ms) for the above model, but what-about 2 secs period between 2 pulses. .
3ms 3ms
---- ----
| | | |
| |<-------- 2Secs-------->| |
----- ------------------------ --------------- - - -
0 0.003 2.003 2.006
This is the result i am trying for...

댓글 수: 1

With my model, you will get a 50% pulse width. For something other than 50%, you should use my model as a source for your model (ie. instead of the Constant block, but with the XOR, etc.).

댓글을 달려면 로그인하십시오.

카테고리

질문:

2012년 1월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by