Variable frequency Square pulse - Simulink

33 visualizaciones (últimos 30 días)
Mohamed Haroon Abdul Jabbar
Mohamed Haroon Abdul Jabbar el 17 de Jul. de 2017
Comentada: Charles Duruaku el 5 de Oct. de 2019
Hi,
I would like to know how can I generate a variable frequency controlled square pulse with 50% duty cycle in Simulink? I wish to vary the frequency in the range of 2KHz to 5.5KHz. It would be nice if you guys could help me.
Thanks a ton!

Respuestas (1)

Quan Tao
Quan Tao el 3 de Ag. de 2017
To generate a square pulse in Simulink, the Pulse Generator block can be used.
Assuming we are using Time based for Pulse type parameter and Use simulation time for Time (t) parameter, the desired waveform of the pulse can be configured by setting the Amplitude, Period (secs), Pulse Width (% of period), and Phase delay (secs) parameters.
Suppose we are using default values for Amplitude and Phase delay (secs). The Pulse Width (% of period) parameter should be set to 50 in order to produce a pulse with 50% duty cycle.
To vary the frequency of the pulse, the Period (secs) can be set based on a base workspace variable. For example, you can define a base workspace variable for frequency:
f = 2000;
Then you can set the Period (secs) parameter to 1/f, which generates a pulse with a frequency of 2 kHz. By varying the value of f, you will be able to vary the frequency of the generated pulse.
To learn more about the Pulse Generator block, please refer to the documentation page on Pulse Generator.
  6 comentarios
3so
3so el 15 de Abr. de 2019
For me it looks straightforward, you can use a "mod" block with a "clock" to derive this pulse signal.
Regards,
Gadfly
vf_pulse.PNG
Charles Duruaku
Charles Duruaku el 5 de Oct. de 2019
could you please explain how to vary the frequency in your block , i am looking for a chirp-like pwm. varies within a frequency range with a specified time.

Iniciar sesión para comentar.

Categorías

Más información sobre Model Verification en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by