Variable frequency Square pulse - Simulink

조회 수: 14 (최근 30일)
Mohamed Haroon Abdul Jabbar
Mohamed Haroon Abdul Jabbar 2017년 7월 17일
댓글: Umar 2024년 8월 4일
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!

답변 (1개)

Quan Tao
Quan Tao 2017년 8월 3일
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.
  댓글 수: 8
Bhaskaran
Bhaskaran 2024년 8월 4일
How to reverse this , means the variable frequency input is there but you have to generate only one fixed frequency from that signal. How to do that?
Umar
Umar 2024년 8월 4일
Hi @Mohamed Haroon Abdul Jabbar,
Use the Signal Builder block which will allow you to define signals that can vary over time, including frequency changes. By connecting the Signal Builder block to the Pulse Generator block, you can control the frequency input while the simulation is running.

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

카테고리

Help CenterFile Exchange에서 Model Verification에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by