Changing switching frequency doesnt work

Hello,
i have a simulink model of an electrical circuit. With the matlab function i control the mosfets of the cuircuit.
I use following code
persistent Zeit if isempty(Zeit) Zeit = 2;
if maximum == u1 && minimum == u3 if t<Zeit y1=1; y4=1; else y6=1; y7=1; end if t-Zeit ==2 Zeit=Zeit+4; end
not this works great. But when i want to higher the switching frequency by lowering the variable Zeit it doesnt switch any more
persistent Zeit if isempty(Zeit) Zeit = 0.025;
if maximum == u1 && minimum == u3 if t<Zeit y1=1; y4=1; else y6=1; y7=1; end if t-Zeit ==0.025 Zeit=Zeit+0.05; end
Hope someone can help me.

댓글 수: 1

Roger Wohlwend
Roger Wohlwend 2014년 9월 18일
Please format your code so that it becomes more readable. And does the first piece of code work or does it not?

답변 (0개)

이 질문은 마감되었습니다.

태그

질문:

2014년 9월 18일

마감:

2022년 12월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by