MATLAB: How to create a pulse generator which outputs pulses at random time intervals in Simulink 7.9(R2012a)

parameterperiodsimulinktunable

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.

Best Answer

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.
Related Question