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

📄 controller2.m

📁 这个Matlab程序包
💻 M
字号:
function b=controller2(varargin)

save controllerb
fprintf('Welcome From Worldhitter')
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    fprintf('\nProvide The Following Data')
    Vs=input('\nEnter The Value Secondary Voltage Voltage(Volts) :')
    a=input('Enter The Value Of Delay Angle(Degrees):')
    R=input('Enter The Value Of Resistance :')
    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)','Load Power(Po)','Input Volt Ampere Rating(VA)','Power Factor(PF)','Average Thyristor Current(Ia)','Rms Thyristor current(Irms)');
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     if(o == 1)
     fprintf('\nThe Magnitude Of Dc Voltage Is As Under')
     c=a*3.14/180;  
     b=1+cos(c);
     w=sqrt(2)*Vs*b/pi;
     Vdc=abs(w)    
     graphics2; %Function call for the graphics
     repeat %Function call for going back in the programme
     repeat(1)
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 2)
     fprintf('The Value Of Average Current Is As Under :')
     c=a*3.14/180;  
     b=1+cos(c);
     w=sqrt(2)*Vs*b/pi;
     Vdc=abs(w)
     Idc=w/R
     graphics2(1);
     repeat %Function call for going back in the programme
     repeat(1)
    %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 3)
     fprintf('Rms Output Voltage is as under :')
     c=a*3.14/180;  
     b=-c+sin(2*c)/2;
     w=Vs*sqrt(1/3.14*(3.14+b));
     Vo=abs(w)
     graphics2(1,2);
     repeat %Function call for going back in the programme
     repeat(1)
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 4)
     fprintf('The Rms Output Current Is As Under :')
     c=a*3.14/180;  
     b=-c+sin(2*c)/2;
     w=Vs*sqrt(1/3.14*(3.14+b));
     Vo=abs(w);
     Io=Vo/R
     graphics2(1,2,3);
     repeat %Function call for going back in the programme
     repeat(1)
      %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   elseif(o == 5)
     fprintf('The Load Power Is As Under :')
     c=a*3.14/180; 
     b=-c+sin(2*c)/2;
     w=Vs*sqrt(1/3.14*(3.14+b));
     Vo=abs(w);
     Io=Vo/R;
     Po=Vo*Io
     graphics2(1,2,3,4);
     repeat %Function call for going back in the programme
     repeat(1)   
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 6)
     fprintf('The Input Volt Ampere Rating Is As Under :')
     c=a*3.14/180; 
     b=-c+sin(2*c)/2;
     w=Vs*sqrt(1/3.14*(3.14+b));
     Vo=abs(w);
     Io=Vo/R;
     Is=Io;
     VA=Vs*Is
     graphics2(1,2,3,4,5)
     repeat %Function call for going back in the programme
     repeat(1)   
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  elseif(o == 7)
     fprintf('The Value Of power Factor Is As Under :')
     c=a*3.14/180; 
     b=-c+sin(2*c)/2;
     w=Vs*sqrt(1/3.14*(3.14+b));
     Vo=abs(w);
     Io=Vo/R;
     Is=Io;
     VA=Vs*Is    
     
     c=a*3.14/180; 
     b=-c+sin(2*c)/2;
     w=Vs*sqrt(1/3.14*(3.14+b));
     Vo=abs(w);
     Io=Vo/R;
     Po=Vo*Io
     
     PF=Po/VA
     graphics2(1,2,3,4,5,6)
     repeat %Function call for going back in the programme
     repeat(1)
     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^     
  elseif(o == 8)
     fprintf('The Value Of Average Thyristor Current Is As Under :')
     c=a*3.14/180; 
     b=1+cos(c);
     Ia=sqrt(2)*Vs*b/(2*pi*R)     
     graphics2(1,2,3,4,5,6,7)
     repeat %Function call for going back in the programme
     repeat(1)
      %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      
  elseif(o == 9)
     fprintf('The Value Of Average Thyristor Current Is As Under :')
     c=a*3.14/180; 
     b=(pi-c+cos(c))/3.14;
     Irms=Vs*sqrt(b)/(R*sqrt(2))     
     graphics2(1,2,3,4,5,6,7,8)
     repeat %Function call for going back in the programme
     repeat(1)         
     
  end
		

⌨️ 快捷键说明

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