How can I create a pulse generator which outputs pulses at random time intervals in Simulink 7.9(R2012a) ?

4 views (last 30 days)
I am trying to generate a time function/waveform with narrow pulses whose interarrival time follows an exponential statistics. The width of the pulses should be narrow but the randomness of the time between the pulses is the most important thing. How can I do this in Simulink using only basic blocks.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 May 2020
Edited: MathWorks Support Team on 16 May 2020
There can be multiple ways to do this. One possible way using two switch blocks. One can be used to control the 'ON period' (TON) of the pulse and the other can be used to control the total period of the pulse.We can count for the fixed width up to TON, then switch the output to zero. Then count up to the number given by the generator and reset the counter. Refer to the attached showPulse.mdl for more details.
Other possible ways of doing this could be to use MATLAB Level-2 S-functions or C MEX S functions to write your own custom source.

More Answers (0)

Categories

Find more on Event Functions in Help Center and File Exchange

Products


Release

R2012a

Community Treasure Hunt

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

Start Hunting!