⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ac_controller.m

📁 Matlab实现无刷直流电机控制系统建模仿真.zip
💻 M
字号:
%This programme solves various formulaes for three phase half wave star rectifier
%This function runs independently as well as with "power_electronics"
%In order to execute this function type ''tphase'' on command prompt
function b=ac_controller(varargin)
a=menu('Choose A Controller','General single Phase Controller','Single Phase Half Wave Controller','Single Phase Full Wave Controller','Tap Changer')
if ( a == 1 )
   
fprintf('Welcome From Worldhitter')
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    fprintf('Provide The Following Data')
    Vs=input('\nEnter The Value Secondary Voltage Voltage(Volts) :')
    m=input('nEnter The Maximum Number Of Cycles :')
    n=input('nEnter The Minimum Number Of Cycles :')
    k=input('Enter The Value Of k If You Have Directly :')
    a=input('Enter The Value Of Delay Angle(Degrees):')
    R=input('Enter The Value Of Resistance :')
    Is=input('Enter The Secondary Current :')
    fprintf('Wait For 2 Seconds')
    pause(2)
     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    o=menu('Click On What You want' ,' Dc Voltage(Vdc)','','Dc Current(Idc)','','Root Mean Square(Load Or Output) Voltage(Vo)','','Root Mean Square(Load Or Output)Current(Io)','','Duty Cycle(K)','','Load Power(Po)','','Maximum Voltage(Vm)','','Input Volt Ampere Rating(VA)','','Power Factor(PF)','','Peak Thyristor Current(Im)','','Average Thyistor Current(Ia)','','Rms Thyristor Current(Ir)');
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    if(o == 1)
     fprintf('\nThe Magnitude Of Dc Voltage Is As Under')
     Vdc=sqrt(2)*Vs/6.28
     graphics %Function call for the graphics
     repeat %Functin call for the repitition
     repeat(1) %Function call for repeating the main menu
     
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 3)
     fprintf('The Value Of Average Voltag Is As Under :')
     Idc=(sqrt(2)*Vs/6.28)/R
     graphics(1)
     repeat %Functin call for the repitition
     repeat(1) %Function call for repeating the main menu
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 5)
     fprintf('Rms Output Voltage is as under :')
     k=n/(n+m);
     Vo=Vs*sqrt(k)
     graphics(1,2)
     repeat
     repeat(1)
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 7)
     fprintf('The Rms Output Current Is As Under :')
     Vo=Vs*sqrt(k);
     Io=Vo/R
     graphics(1,2,3)
     repeat
     repeat(1)
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 9)
     fprintf('The Duty Cycle Is As under :')
     K=n/(n+m)
     graphics(1,2,3,4)
     repeat
     repeat(1)
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 11)
     fprintf('The Load Power Is As Under :')
     k=n/(n+m);
     Vo=Vs*sqrt(k);
     Io=Vo/R;
     Po=Vo*Io
     graphics(1,2,3,4,5)
     repeat
     repeat(1)
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    elseif(o == 13)
     fprintf('The Value Of Peak Current Im As Under :')
     Vm=sqrt(2)*Vs;     
     Im=Vm/R
     graphics(1,2,3,4,5,6,7)
     repeat
     repeat(1)
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     elseif(o == 15)
     fprintf('The value Of Peak Voltage Is as Under :')
     Vm=sqrt(2)*Vs
     graphics(1,2,3,4,5,6)
     repeat
     repeat(1)
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 17)
     fprintf('The Input Volt Ampere Rating Is As Under :')
     VA=Vs*Is
     graphics(1,2,3,4,5,6,7,8)
     repeat
     repeat(1)
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 19)
     fprintf('The Value Of power Factor Is As Under :')
     Vo=Vs*sqrt(k);
     Io=Vo/R;
     Po=Vo*Io;
     
     VA=Vs*Is;
     PF=Po/VA
     graphics(1,2,3,4,5,6,7,8,9)
     
     fprintf('For This Particular Controller We Will Use sqrt(k)')
     
     k=n/(n+m);
     PF=sqrt(k)
     repeat
     repeat(1)
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 elseif(o == 21)
     
     fprintf('The Value Of Average Thyristor Current Is As Under' )
     Vm=sqrt(2)*Vs;
     Im=Vm/R;
     Ia=Im*n/(m+n)*pi
     graphics(1,2,3,4,5,6,7,8,9,10)
     repeat
     repeat(1)
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 23)
     fprintf('The Value Of Rms Thyristor Current Is As Under' )
     Vm=sqrt(2)*Vs;
     Im=Vm/R;
     Irms=(Im*sqrt(n/(m+n)))./2
     graphics(1,2,3,4,5,6,7,8,9,10,11)
     repeat
     repeat(1)
   
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
elseif(a == 2)
   controller1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
elseif(a == 3)
   controller2   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
elseif(a == 4)
   controller3
   
   
end
		

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -