How To Input Duty Ratio into Pulse Generator

32 ビュー (過去 30 日間)
CHOOBO KASEMPA
CHOOBO KASEMPA 2022 年 12 月 17 日
回答済み: Vasco Lenzi 2022 年 12 月 19 日
I am new to using MATLAB and as compared to Plexim I realised it is not as straight forward to input the duty ratio/cycle into the pulse generator in Matlab. I need to input a duty ratio of 0.5 with a frequency of 50kHz. In the Parameters section all I get is the Amplitude, Period, Phase Width, Phase delay and Pulse type. Where do I input my stated values?

回答 (4 件)

Dr Narayanaswamy P R Iyer
Dr Narayanaswamy P R Iyer 2022 年 12 月 17 日
Enter period as 20e-6 Seconds and pulse width as 50.

R SRIRANJANI RAMAKRISHNAN
R SRIRANJANI RAMAKRISHNAN 2022 年 12 月 18 日
Input duty ratio compared to sawtooth wave gives variable pulse generator output

Anupam Agarwal
Anupam Agarwal 2022 年 12 月 19 日
The pulse width is your duty cycle. If you need duty cycle of 0.5 then input 50 in the pulse width% part.

Vasco Lenzi
Vasco Lenzi 2022 年 12 月 19 日
I would like to provide an alternative block: since 2020b we ship a new PWM block in Simulink under "Discontinuities".
This block accept Duty Cycle as an input signal, with values between 0 and 1. The block you are using now will only generate static PWM at a fix duty cycle, with no possibilities to vary the Duty Cycle.
The PWM block will then be more useful if you are planning to use closed loop simulations with controllers. Additionally it is implemented to be very effiecient implementation for the solver.
See below an example of parametrization:

コミュニティ

カテゴリ

Help Center および File ExchangeSources についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by