Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

script function pulse rectangle PWM with duty cycle in simulink

18 Ansichten (letzte 30 Tage)
Julio Vela
Julio Vela am 14 Okt. 2020
Geschlossen: Sabin am 2 Jan. 2026 um 12:06
I can't make the pulse width repeat in every time period. I just need that in the code
  5 Kommentare
Julio Vela
Julio Vela am 12 Feb. 2021
Bearbeitet: Julio Vela am 12 Feb. 2021
its easy translate:
function PWM = fcn(amplitude,duty_cycle,requency,clock)%generator PWM
% *** declaración de variables ***
periode=1/frequency;%periodo=period
iduty=duty_cycle/100;
ton=iduty*periode;
toff=periode-ton;
if ((mod((clockt),periode)<=(0)))
PWM=amplitude;
else
PWM=0;
end
end
Julio Vela
Julio Vela am 17 Feb. 2021
i resolved the problem!!!
https://www.youtube.com/channel/UCN7owHyMvoT7I6dv2eah6dA/videos

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by