Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Speed Control of Separately Excited DC Motor by Controlled Rectifier

조회 수: 3 (최근 30일)
ali al-khayyat
ali al-khayyat 2020년 6월 23일
마감: Sabin 2024년 12월 16일
there is s function to generate the firing angle to the three phase controlled rectifier
the inpu to this s function block is the controlled voltage
can anyone explain this code of s function
function [sys,x0,str,ts]=abcrtoqdor(t,x,u,flag)
%dfsfgsfdgdghdhdfg
switch flag
case 0
[sys,x0,str,ts]=mdlInitializeSizes;
case 3
sys=mdlOutput(t,x,u);
case {1,2,4,9}
sys=[];
otherwise
error(['Unhandel flag =',num2str(flag)]);
end;
%========================================================================
%========================================================================
function [sys,x0,str,ts]=mdlInitializeSizes
sizes=simsizes;
sizes.NumContStates= 0;
sizes.NumDiscStates= 0;
sizes.NumOutputs= 1;
sizes.NumInputs= 2;
sizes.DirFeedthrough=1;
sizes.NumSampleTimes=1;
sys=simsizes(sizes);
x0=[];
str=[];
ts=[-1 0];
%=========================================================================
%=========================================================================
function sys=mdlOutput(t,x,u);
%=========================================================================
vc=u(1);
vm=u(2);
q=(vc*pi)/(3*vm);
if q>1
q=1;
end
if q<-1
q=-1;
end
a=acos(q);
sys=a*180/pi;

답변 (0개)

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

커뮤니티

더 많은 답변 보기:  Power Electronics Community

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by