You are on page 1of 26

Computer Applications in Electrical

Power and Machines


Dr. Islam Mohamed
Electrical Engineering Department
(Lecture (2)

Applications in Power Electronics Converter


Lecture Content
 Applications about Power Electronics converter:

 AC/DC Converter (Rectifier circuits)

 DC/AC Converter (Inverter circuits)


M-File
Simulink File
Figures and Results
Analysis
Waveforms
Calculations
M-File
Simulink

RL-load
Figures and Results

io
M-File
Simulink
Figures and Results
General Program of Singl-phase uncontroller
rectifer R-load
clc,clear
global phi Alfa_rad for i=1:length(wt)
%% Enter Data if wt(i)<Alfa_rad
R=input('Enter ehe value of the load vo(i)=0;
resistance (ohm):'); io(i)=0;
L=input('Enter the value of the load vscr(i)=vs(i);
inductance (H):'); elseif wt(i)>Alfa_rad&& wt(i)<=B
Vs=input('Enter the value of the supply vo(i)=vs(i);
voltage (rms):'); vscr(i)=0;
f=input('Enter the supply frequency io(i)=Vm/Z*(sin(wt(i)-phi)-
(Hz):'); sin(Alfa_rad-phi)*exp((Alfa_rad-
Alfa=input('Enter the firing angle wt(i))/tan(phi)));
(degree):'); else
w=2*pi*f;Vm=sqrt(2)*Vs;XL=w*L;Z=sqrt(R^2+XL vo(i)=0;
^2);phi=atan(XL/R); vscr(i)=vs(i);
Alfa_rad=Alfa*pi/180; io(i)=0;
%% Calculate Beta end
B=fzero('CRL_B',pi); end
%% Draw Waveforms
wt=0:1e-2:2*pi;
vs=Vm*sin(wt);
vR=io*R;
vL=vo-vR;
subplot(221),plot(wt,vs)
subplot(222),plot(wt,vo)
subplot(223),plot(wt,vscr)
subplot(224),plot(wt,io)

%% Calculate output Average


voltage&Current and RMS
Voavg=trapz(wt,vo)/(2*pi);
Ioavg=Voavg/R;
Vorms=sqrt(trapz(wt,vo.^2)/(2*pi));
Iorms=sqrt(trapz(wt,io.^2)/(2*pi));

fprintf('Voavg=%.2f V & Ioavg=%.2fA\n',Voavg,Ioavg)


fprintf('Vorms=%.2f V & Iorms=%.2fA\n',Vorms,Iorms)
P=Iorms^2*R
pf=P/(Vs*Iorms)
Simulink

RL-load
End Lecture (1)

You might also like